pub struct PartialDescriptor { /* private fields */ }Expand description
A descriptor opened for seek-based partial reads.
Holds the small records read up front plus the on-disk locators of every
object/channel/model record. Every read goes through an internal
CountingReader, so bytes_read is a real, deterministic I/O figure.
Implementations§
Source§impl PartialDescriptor
impl PartialDescriptor
Sourcepub fn open(path: &Path, limits: Limits) -> Result<PartialLoad>
pub fn open(path: &Path, limits: Limits) -> Result<PartialLoad>
Walk the framing of the descriptor at path, reading only the small
records. Returns PartialLoad::Ineligible when the descriptor cannot be
served lazily (no op table or external objects): the caller must then use
the full path.
Sourcepub fn bytes_read(&self) -> u64
pub fn bytes_read(&self) -> u64
Real bytes fetched from the descriptor file by this loader.
Sourcepub fn source_len(&self) -> u64
pub fn source_len(&self) -> u64
Declared source length (from the INTEGRITY record).
Sourcepub fn source_sha256(&self) -> [u8; 32]
pub fn source_sha256(&self) -> [u8; 32]
Declared whole-source SHA-256 (from the INTEGRITY record).
Sourcepub fn object_count(&self) -> usize
pub fn object_count(&self) -> usize
Number of raw object records in the descriptor.
Trait Implementations§
Source§impl Debug for PartialDescriptor
impl Debug for PartialDescriptor
Source§impl SourceServer for PartialDescriptor
impl SourceServer for PartialDescriptor
Auto Trait Implementations§
impl !Freeze for PartialDescriptor
impl !RefUnwindSafe for PartialDescriptor
impl !Sync for PartialDescriptor
impl Send for PartialDescriptor
impl Unpin for PartialDescriptor
impl UnsafeUnpin for PartialDescriptor
impl UnwindSafe for PartialDescriptor
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