Struct LayerMediaType
pub struct LayerMediaType(/* private fields */);Expand description
An OCI layer media type.
Implementations§
§impl LayerMediaType
impl LayerMediaType
pub fn new(media_type: OciMediaType) -> Result<LayerMediaType, LayerError>
pub fn new(media_type: OciMediaType) -> Result<LayerMediaType, LayerError>
Creates a layer media type after checking that it is layer-shaped.
pub const fn tar() -> LayerMediaType
pub const fn tar() -> LayerMediaType
Returns an uncompressed tar layer media type.
pub const fn gzip_tar() -> LayerMediaType
pub const fn gzip_tar() -> LayerMediaType
Returns a gzip-compressed tar layer media type.
pub const fn zstd_tar() -> LayerMediaType
pub const fn zstd_tar() -> LayerMediaType
Returns a zstd-compressed tar layer media type.
pub const fn media_type(&self) -> &OciMediaType
pub const fn media_type(&self) -> &OciMediaType
Returns the underlying media type.
pub const fn compression(&self) -> LayerCompression
pub const fn compression(&self) -> LayerCompression
Returns the compression implied by the media type.
Trait Implementations§
§impl Clone for LayerMediaType
impl Clone for LayerMediaType
§fn clone(&self) -> LayerMediaType
fn clone(&self) -> LayerMediaType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for LayerMediaType
impl Debug for LayerMediaType
§impl Display for LayerMediaType
impl Display for LayerMediaType
§impl Hash for LayerMediaType
impl Hash for LayerMediaType
§impl Ord for LayerMediaType
impl Ord for LayerMediaType
§impl PartialEq for LayerMediaType
impl PartialEq for LayerMediaType
§impl PartialOrd for LayerMediaType
impl PartialOrd for LayerMediaType
impl Eq for LayerMediaType
impl StructuralPartialEq for LayerMediaType
Auto Trait Implementations§
impl Freeze for LayerMediaType
impl RefUnwindSafe for LayerMediaType
impl Send for LayerMediaType
impl Sync for LayerMediaType
impl Unpin for LayerMediaType
impl UnsafeUnpin for LayerMediaType
impl UnwindSafe for LayerMediaType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more