Struct oci_distribution::manifest::OciDescriptor[][src]

pub struct OciDescriptor {
    pub media_type: String,
    pub digest: String,
    pub size: i64,
    pub urls: Option<Vec<String>>,
    pub annotations: Option<HashMap<String, String>>,
}

The OCI descriptor is a generic object used to describe other objects.

It is defined in the OCI Image Specification: https://github.com/opencontainers/image-spec/blob/master/descriptor.md#properties

Fields

media_type: String

The media type of this descriptor.

Layers, config, and manifests may all have descriptors. Each is differentiated by its mediaType.

This REQUIRED property contains the media type of the referenced content. Values MUST comply with RFC 6838, including the naming requirements in its section 4.2.

digest: String

The SHA 256 or 512 digest of the object this describes.

This REQUIRED property is the digest of the targeted content, conforming to the requirements outlined in Digests. Retrieved content SHOULD be verified against this digest when consumed via untrusted sources.

size: i64

The size, in bytes, of the object this describes.

This REQUIRED property specifies the size, in bytes, of the raw content. This property exists so that a client will have an expected size for the content before processing. If the length of the retrieved content does not match the specified length, the content SHOULD NOT be trusted.

urls: Option<Vec<String>>

This OPTIONAL property specifies a list of URIs from which this object MAY be downloaded. Each entry MUST conform to RFC 3986. Entries SHOULD use the http and https schemes, as defined in RFC 7230.

annotations: Option<HashMap<String, String>>

This OPTIONAL property contains arbitrary metadata for this descriptor. This OPTIONAL property MUST use the annotation rules. https://github.com/opencontainers/image-spec/blob/master/annotations.md#rules

Trait Implementations

impl Clone for OciDescriptor[src]

impl Debug for OciDescriptor[src]

impl Default for OciDescriptor[src]

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

impl Serialize for OciDescriptor[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.