Struct oci_client::manifest::OciImageManifest
source · 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 moresource§impl Debug for OciImageManifest
impl Debug for OciImageManifest
source§impl Default for OciImageManifest
impl Default for OciImageManifest
source§impl<'de> Deserialize<'de> for OciImageManifest
impl<'de> Deserialize<'de> for OciImageManifest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for OciImageManifest
impl Display for OciImageManifest
source§impl From<OciImageManifest> for OciManifest
impl From<OciImageManifest> for OciManifest
source§fn from(m: OciImageManifest) -> Self
fn from(m: OciImageManifest) -> Self
Auto Trait Implementations§
impl Freeze for OciImageManifest
impl RefUnwindSafe for OciImageManifest
impl Send for OciImageManifest
impl Sync for OciImageManifest
impl Unpin for OciImageManifest
impl UnwindSafe for OciImageManifest
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)