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