Struct wick_oci_utils::OciImageManifest
source · pub struct OciImageManifest {
pub schema_version: u8,
pub media_type: Option<String>,
pub config: OciDescriptor,
pub layers: Vec<OciDescriptor>,
pub annotations: Option<HashMap<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.
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.
Implementations§
source§impl OciImageManifest
impl OciImageManifest
sourcepub fn build(
layers: &[ImageLayer],
config: &Config,
annotations: Option<HashMap<String, String>>
) -> OciImageManifest
pub fn build( layers: &[ImageLayer], config: &Config, annotations: Option<HashMap<String, String>> ) -> OciImageManifest
Create a new OciImageManifest using the given parameters
This can be useful to create an OCI Image Manifest with custom annotations.
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