pub struct MetadataReferences {
pub manifest: MetadataReference,
pub tarsplit: MetadataReference,
}Expand description
References to the manifest and tarsplit metadata. You can read these from the file footer or from the annotations on the OCI layer descriptor.
Fields§
§manifest: MetadataReferenceThe location of the manifest data
tarsplit: MetadataReferenceThe location of the tarsplit data
Implementations§
Source§impl MetadataReferences
impl MetadataReferences
Read the metadata references from the file footer. The provided data can be any suffix of the file, but it must be at least 72 bytes in length (to contain the footer). Returns None if this doesn’t appear to be a zstd:chunked file.
Sourcepub fn from_oci<'a, S: AsRef<str> + 'a>(
get: impl Fn(&str) -> Option<&'a S>,
) -> Option<Self>
pub fn from_oci<'a, S: AsRef<str> + 'a>( get: impl Fn(&str) -> Option<&'a S>, ) -> Option<Self>
Parses the metadata references from OCI layer descriptor annotations. You should provide a ‘get’ closure that returns the requested annotation, or None if it doesn’t exist. Returns None if this doesn’t appear to be a zstd:chunked layer descriptor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetadataReferences
impl RefUnwindSafe for MetadataReferences
impl Send for MetadataReferences
impl Sync for MetadataReferences
impl Unpin for MetadataReferences
impl UnsafeUnpin for MetadataReferences
impl UnwindSafe for MetadataReferences
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