pub struct ImageMetadata { /* private fields */ }Expand description
OCI image metadata composed from focused primitive crates.
Implementations§
Source§impl ImageMetadata
impl ImageMetadata
Sourcepub fn new(name: ImageName) -> ImageMetadata
pub fn new(name: ImageName) -> ImageMetadata
Creates image metadata from a name.
Sourcepub fn with_reference(self, reference: ImageReference) -> ImageMetadata
pub fn with_reference(self, reference: ImageReference) -> ImageMetadata
Adds an image reference.
Sourcepub fn with_id(self, id: ImageId) -> ImageMetadata
pub fn with_id(self, id: ImageId) -> ImageMetadata
Adds an image ID.
Sourcepub const fn with_kind(self, kind: ImageKind) -> ImageMetadata
pub const fn with_kind(self, kind: ImageKind) -> ImageMetadata
Adds an image kind.
Sourcepub fn with_descriptor(self, descriptor: OciDescriptor) -> ImageMetadata
pub fn with_descriptor(self, descriptor: OciDescriptor) -> ImageMetadata
Adds a descriptor.
Sourcepub fn with_platform(self, platform: OciPlatform) -> ImageMetadata
pub fn with_platform(self, platform: OciPlatform) -> ImageMetadata
Adds platform metadata.
Sourcepub fn with_media_type(self, media_type: OciMediaType) -> ImageMetadata
pub fn with_media_type(self, media_type: OciMediaType) -> ImageMetadata
Adds a media type marker.
Sourcepub fn with_annotation(self, annotation: Annotation) -> ImageMetadata
pub fn with_annotation(self, annotation: Annotation) -> ImageMetadata
Adds an annotation.
Sourcepub const fn reference(&self) -> Option<&ImageReference>
pub const fn reference(&self) -> Option<&ImageReference>
Returns the optional reference.
Sourcepub fn descriptors(&self) -> &[OciDescriptor]
pub fn descriptors(&self) -> &[OciDescriptor]
Returns descriptors.
Sourcepub fn annotations(&self) -> &[Annotation]
pub fn annotations(&self) -> &[Annotation]
Returns annotations.
Trait Implementations§
Source§impl Clone for ImageMetadata
impl Clone for ImageMetadata
Source§fn clone(&self) -> ImageMetadata
fn clone(&self) -> ImageMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageMetadata
impl Debug for ImageMetadata
Source§impl PartialEq for ImageMetadata
impl PartialEq for ImageMetadata
Source§fn eq(&self, other: &ImageMetadata) -> bool
fn eq(&self, other: &ImageMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ImageMetadata
impl StructuralPartialEq for ImageMetadata
Auto Trait Implementations§
impl Freeze for ImageMetadata
impl RefUnwindSafe for ImageMetadata
impl Send for ImageMetadata
impl Sync for ImageMetadata
impl Unpin for ImageMetadata
impl UnsafeUnpin for ImageMetadata
impl UnwindSafe for ImageMetadata
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
Mutably borrows from an owned value. Read more