pub struct OciDescriptor { /* private fields */ }Expand description
OCI descriptor metadata.
Implementations§
Source§impl OciDescriptor
impl OciDescriptor
Sourcepub fn new(
media_type: OciMediaType,
digest: OciDigest,
size: DescriptorSize,
) -> Self
pub fn new( media_type: OciMediaType, digest: OciDigest, size: DescriptorSize, ) -> Self
Creates descriptor metadata from required fields.
Sourcepub fn with_url(self, url: DescriptorUrl) -> Self
pub fn with_url(self, url: DescriptorUrl) -> Self
Adds a URL marker.
Sourcepub fn with_annotation(self, annotation: Annotation) -> Self
pub fn with_annotation(self, annotation: Annotation) -> Self
Adds an annotation.
Sourcepub fn with_data(self, data: DescriptorData) -> Self
pub fn with_data(self, data: DescriptorData) -> Self
Adds embedded data marker text.
Sourcepub fn with_artifact_type(self, artifact_type: ArtifactType) -> Self
pub fn with_artifact_type(self, artifact_type: ArtifactType) -> Self
Adds an artifact type.
Sourcepub fn with_platform(self, platform: OciPlatform) -> Self
pub fn with_platform(self, platform: OciPlatform) -> Self
Adds a platform.
Sourcepub const fn media_type(&self) -> &OciMediaType
pub const fn media_type(&self) -> &OciMediaType
Returns the media type.
Sourcepub const fn size(&self) -> DescriptorSize
pub const fn size(&self) -> DescriptorSize
Returns the size.
Sourcepub fn urls(&self) -> &[DescriptorUrl]
pub fn urls(&self) -> &[DescriptorUrl]
Returns URL markers.
Sourcepub fn annotations(&self) -> &[Annotation]
pub fn annotations(&self) -> &[Annotation]
Returns annotations.
Trait Implementations§
Source§impl Clone for OciDescriptor
impl Clone for OciDescriptor
Source§fn clone(&self) -> OciDescriptor
fn clone(&self) -> OciDescriptor
Returns a duplicate of the value. Read more
1.0.0 · 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 OciDescriptor
impl Debug for OciDescriptor
Source§impl PartialEq for OciDescriptor
impl PartialEq for OciDescriptor
impl Eq for OciDescriptor
impl StructuralPartialEq 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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more