oci_image_spec/specs/v1/manifest.rs
1/// Manifest provides `application/vnd.oci.image.manifest.v1+json` mediatype structure when marshalled to JSON.
2#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
3pub struct Manifest {
4 /// schema_version is the image manifest schema that this image follows
5 #[serde(rename = "SchemaVersion")]
6 pub schema_version: isize,
7
8 /// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
9 #[serde(rename = "mediaType", skip_serializing_if = "Option::is_none")]
10 pub media_type: Option<String>,
11
12 /// Config references a configuration object for a container, by digest.
13 /// The referenced configuration object is a JSON blob that the runtime uses to set up the container.
14 #[serde(rename = "config")]
15 pub config: super::descriptor::Descriptor,
16
17 /// Layers is an indexed list of layers referenced by the manifest.
18 #[serde(rename = "layers")]
19 pub layers: Vec<super::descriptor::Descriptor>,
20
21 /// Annotations contains arbitrary metadata for the image manifest.
22 #[serde(rename = "annotations", skip_serializing_if = "Option::is_none")]
23 pub annotations: Option<std::collections::HashMap<String, String>>,
24}