Enum OciMediaType
pub enum OciMediaType {
Known(KnownMediaType),
Custom(String),
}Expand description
A known or custom OCI media type.
Variants§
Known(KnownMediaType)
Custom(String)
Implementations§
§impl OciMediaType
impl OciMediaType
pub fn custom(value: impl AsRef<str>) -> Result<OciMediaType, MediaTypeError>
pub fn custom(value: impl AsRef<str>) -> Result<OciMediaType, MediaTypeError>
Creates a custom media type after conservative validation.
pub const fn image_manifest() -> OciMediaType
pub const fn image_manifest() -> OciMediaType
Returns the OCI image manifest media type.
pub const fn image_index() -> OciMediaType
pub const fn image_index() -> OciMediaType
Returns the OCI image index media type.
pub const fn image_config() -> OciMediaType
pub const fn image_config() -> OciMediaType
Returns the OCI image config media type.
pub const fn artifact_manifest() -> OciMediaType
pub const fn artifact_manifest() -> OciMediaType
Returns the OCI artifact manifest media type.
Trait Implementations§
§impl AsRef<str> for OciMediaType
impl AsRef<str> for OciMediaType
§impl Clone for OciMediaType
impl Clone for OciMediaType
§fn clone(&self) -> OciMediaType
fn clone(&self) -> OciMediaType
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 OciMediaType
impl Debug for OciMediaType
§impl Display for OciMediaType
impl Display for OciMediaType
§impl From<KnownMediaType> for OciMediaType
impl From<KnownMediaType> for OciMediaType
§fn from(value: KnownMediaType) -> OciMediaType
fn from(value: KnownMediaType) -> OciMediaType
Converts to this type from the input type.
§impl FromStr for OciMediaType
impl FromStr for OciMediaType
§impl Hash for OciMediaType
impl Hash for OciMediaType
§impl Ord for OciMediaType
impl Ord for OciMediaType
§impl PartialEq for OciMediaType
impl PartialEq for OciMediaType
§impl PartialOrd for OciMediaType
impl PartialOrd for OciMediaType
§impl TryFrom<&str> for OciMediaType
impl TryFrom<&str> for OciMediaType
impl Eq for OciMediaType
impl StructuralPartialEq for OciMediaType
Auto Trait Implementations§
impl Freeze for OciMediaType
impl RefUnwindSafe for OciMediaType
impl Send for OciMediaType
impl Sync for OciMediaType
impl Unpin for OciMediaType
impl UnsafeUnpin for OciMediaType
impl UnwindSafe for OciMediaType
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