pub struct LayerMediaType(/* private fields */);Expand description
An OCI layer media type.
Implementations§
Source§impl LayerMediaType
impl LayerMediaType
Sourcepub fn new(media_type: OciMediaType) -> Result<Self, LayerError>
pub fn new(media_type: OciMediaType) -> Result<Self, LayerError>
Creates a layer media type after checking that it is layer-shaped.
Sourcepub const fn media_type(&self) -> &OciMediaType
pub const fn media_type(&self) -> &OciMediaType
Returns the underlying media type.
Sourcepub const fn compression(&self) -> LayerCompression
pub const fn compression(&self) -> LayerCompression
Returns the compression implied by the media type.
Trait Implementations§
Source§impl Clone for LayerMediaType
impl Clone for LayerMediaType
Source§fn clone(&self) -> LayerMediaType
fn clone(&self) -> LayerMediaType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayerMediaType
impl Debug for LayerMediaType
Source§impl Display for LayerMediaType
impl Display for LayerMediaType
Source§impl Hash for LayerMediaType
impl Hash for LayerMediaType
Source§impl Ord for LayerMediaType
impl Ord for LayerMediaType
Source§fn cmp(&self, other: &LayerMediaType) -> Ordering
fn cmp(&self, other: &LayerMediaType) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LayerMediaType
impl PartialEq for LayerMediaType
Source§fn eq(&self, other: &LayerMediaType) -> bool
fn eq(&self, other: &LayerMediaType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§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