pub struct Container<'a> { /* private fields */ }👎Deprecated since 0.2.0:
superseded by the .verit file: use FileView. A .vertc container carries no schema section, so it cannot be read without an out-of-band registry. Removed in 0.3.0 — see ADR-0002.
Expand description
A read-only view over a .vertc container’s bytes (e.g. an mmap). Parsing
validates the header and the whole index up front, so every later
get is a bounds-free slice.
Implementations§
Source§impl<'a> Container<'a>
impl<'a> Container<'a>
Sourcepub fn parse(buf: &'a [u8]) -> Result<Container<'a>>
pub fn parse(buf: &'a [u8]) -> Result<Container<'a>>
Validate the header and index of a container image. Rejects bad magic/version, an out-of-range or unaligned index, and any record whose extent falls outside the record region or is misaligned.
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Container<'a>
impl<'a> RefUnwindSafe for Container<'a>
impl<'a> Send for Container<'a>
impl<'a> Sync for Container<'a>
impl<'a> Unpin for Container<'a>
impl<'a> UnsafeUnpin for Container<'a>
impl<'a> UnwindSafe for Container<'a>
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