Struct oci_distribution::manifest::OciManifest[][src]

pub struct OciManifest {
    pub schema_version: u8,
    pub media_type: Option<String>,
    pub config: OciDescriptor,
    pub layers: Vec<OciDescriptor>,
    pub annotations: Option<HashMap<String, String>>,
}

The OCI manifest describes an OCI image.

It is part of the OCI specification, and is defined here: https://github.com/opencontainers/image-spec/blob/master/manifest.md

Fields

schema_version: u8

This is a schema version.

The specification does not specify the width of this integer. However, the only version allowed by the specification is 2. So we have made this a u8.

media_type: Option<String>

This is an optional media type describing this manifest.

It is reserved for compatibility, but the specification does not seem to recommend setting it.

config: OciDescriptor

The image configuration.

This object is required.

layers: Vec<OciDescriptor>

The OCI image layers

The specification is unclear whether this is required. We have left it required, assuming an empty vector can be used if necessary.

annotations: Option<HashMap<String, String>>

The annotations for this manifest

The specification says "If there are no annotations then this property MUST either be absent or be an empty map." TO accomodate either, this is optional.

Trait Implementations

impl Clone for OciManifest[src]

impl Debug for OciManifest[src]

impl Default for OciManifest[src]

impl<'de> Deserialize<'de> for OciManifest[src]

impl Serialize for OciManifest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.