Struct oci_client::manifest::OciDescriptor
source · pub struct OciDescriptor {
pub media_type: String,
pub digest: String,
pub size: i64,
pub urls: Option<Vec<String>>,
pub annotations: Option<BTreeMap<String, String>>,
}
Expand description
The OCI descriptor is a generic object used to describe other objects.
It is defined in the OCI Image Specification:
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<BTreeMap<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/main/annotations.md#rules
Trait Implementations§
source§impl AsLayerDescriptor for &OciDescriptor
impl AsLayerDescriptor for &OciDescriptor
source§fn as_layer_descriptor(&self) -> LayerDescriptor<'_>
fn as_layer_descriptor(&self) -> LayerDescriptor<'_>
source§impl Clone for OciDescriptor
impl Clone for OciDescriptor
source§fn clone(&self) -> OciDescriptor
fn clone(&self) -> OciDescriptor
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OciDescriptor
impl Debug for OciDescriptor
source§impl Default for OciDescriptor
impl Default for OciDescriptor
source§impl<'de> Deserialize<'de> for OciDescriptor
impl<'de> Deserialize<'de> for OciDescriptor
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 OciDescriptor
impl Display for OciDescriptor
Auto Trait Implementations§
impl Freeze for OciDescriptor
impl RefUnwindSafe for OciDescriptor
impl Send for OciDescriptor
impl Sync for OciDescriptor
impl Unpin for OciDescriptor
impl UnwindSafe for OciDescriptor
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
)