pub struct ReconstructCtx<'a> { /* private fields */ }Expand description
What an entry reconstructs from: the shared archive fd, the real file length every bounds check is made against, and — for storage models whose entries reference other entries — a way to resolve one.
Passed by reference into Entry::reconstruct so that the storage model
owns the reconstruction and ZnippyArchive owns only the file.
Implementations§
Source§impl<'a> ReconstructCtx<'a>
impl<'a> ReconstructCtx<'a>
Sourcepub fn archive(&self) -> &Arc<File> ⓘ
pub fn archive(&self) -> &Arc<File> ⓘ
The archive fd, read via positioned I/O so reconstruction is safe to run concurrently from many threads.
Sourcepub fn archive_len(&self) -> u64
pub fn archive_len(&self) -> u64
Real byte length of the archive file.
Sourcepub fn resolve_base(&self, path: &str, verify: bool) -> Result<Vec<u8>>
pub fn resolve_base(&self, path: &str, verify: bool) -> Result<Vec<u8>>
Resolve another entry’s bytes, for a chunk that references one. Err
when no resolver was supplied, and Err — never a stack overflow — when
the chain is longer than MAX_RECONSTRUCT_DEPTH.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ReconstructCtx<'a>
impl<'a> !UnwindSafe for ReconstructCtx<'a>
impl<'a> Freeze for ReconstructCtx<'a>
impl<'a> Send for ReconstructCtx<'a>
impl<'a> Sync for ReconstructCtx<'a>
impl<'a> Unpin for ReconstructCtx<'a>
impl<'a> UnsafeUnpin for ReconstructCtx<'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