pub struct Layout { /* private fields */ }Expand description
An OCI image layout inside a tar file, indexed without unpacking it.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn read_blob(&self, d: &Descriptor) -> Result<Vec<u8>>
pub fn read_blob(&self, d: &Descriptor) -> Result<Vec<u8>>
A blob read into memory (manifests and configs), checked against its digest.
Sourcepub fn blob_reader(&self, digest: &str) -> Result<(Take<File>, u64)>
pub fn blob_reader(&self, digest: &str) -> Result<(Take<File>, u64)>
A blob’s bytes as a reader, and its size.
Sourcepub fn top(&self) -> Result<Descriptor>
pub fn top(&self) -> Result<Descriptor>
The image the layout holds: index.json’s one manifest.
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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