pub struct OciImageManifest {
pub schema_version: u8,
pub media_type: Option<String>,
pub config: OciDescriptor,
pub layers: Vec<OciDescriptor>,
pub artifact_type: Option<String>,
pub annotations: Option<BTreeMap<String, String>>,
}
Expand description
The OCI image manifest describes an OCI image.
It is part of the OCI specification, and is defined here
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.
This property SHOULD be used and remain compatible with earlier versions of this specification and with other similar external formats.
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.
artifact_type: Option<String>
The OCI artifact type
This OPTIONAL property contains the type of an artifact when the manifest is used for an artifact. This MUST be set when config.mediaType is set to the empty value. If defined, the value MUST comply with RFC 6838, including the naming requirements in its section 4.2, and MAY be registered with IANA. Implementations storing or copying image manifests MUST NOT error on encountering an artifactType that is unknown to the implementation.
Introduced in OCI Image Format spec v1.1
annotations: Option<BTreeMap<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.
Implementations§
Trait Implementations§
Source§impl Clone for OciImageManifest
impl Clone for OciImageManifest
Source§fn clone(&self) -> OciImageManifest
fn clone(&self) -> OciImageManifest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more