Struct oci_spec::image::DescriptorBuilder
source · pub struct DescriptorBuilder { /* private fields */ }
Expand description
Builder for Descriptor
.
Implementations§
source§impl DescriptorBuilder
impl DescriptorBuilder
sourcepub fn media_type<VALUE: Into<MediaType>>(self, value: VALUE) -> Self
pub fn media_type<VALUE: Into<MediaType>>(self, value: VALUE) -> Self
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.
sourcepub fn digest<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn digest<VALUE: Into<String>>(self, value: VALUE) -> Self
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.
sourcepub fn size<VALUE: Into<i64>>(self, value: VALUE) -> Self
pub fn size<VALUE: Into<i64>>(self, value: VALUE) -> Self
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.
sourcepub fn annotations<VALUE: Into<HashMap<String, String>>>(
self,
value: VALUE,
) -> Self
pub fn annotations<VALUE: Into<HashMap<String, String>>>( self, value: VALUE, ) -> Self
This OPTIONAL property contains arbitrary metadata for this descriptor. This OPTIONAL property MUST use the annotation rules.
sourcepub fn platform<VALUE: Into<Platform>>(self, value: VALUE) -> Self
pub fn platform<VALUE: Into<Platform>>(self, value: VALUE) -> Self
This OPTIONAL property describes the minimum runtime requirements of the image. This property SHOULD be present if its target is platform-specific.
sourcepub fn artifact_type<VALUE: Into<MediaType>>(self, value: VALUE) -> Self
pub fn artifact_type<VALUE: Into<MediaType>>(self, value: VALUE) -> Self
This OPTIONAL property contains the type of an artifact when the descriptor points to an artifact. This is the value of the config descriptor mediaType when the descriptor references an image manifest. If defined, the value MUST comply with RFC 6838, including the naming requirements in its section 4.2, and MAY be registered with IANA.
sourcepub fn data<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn data<VALUE: Into<String>>(self, value: VALUE) -> Self
This OPTIONAL property contains an embedded representation of the referenced content. Values MUST conform to the Base 64 encoding, as defined in RFC 4648. The decoded data MUST be identical to the referenced content and SHOULD be verified against the digest and size fields by content consumers. See Embedded Content for when this is appropriate.