pub struct Directory {
pub descriptors: Vec<ChunkDescriptor>,
}Expand description
The chunk directory: one descriptor per chunk, in file order.
Fields§
§descriptors: Vec<ChunkDescriptor>Every descriptor, including null ones.
Implementations§
Source§impl Directory
impl Directory
Sourcepub fn entries(&self) -> impl Iterator<Item = &ChunkDescriptor>
pub fn entries(&self) -> impl Iterator<Item = &ChunkDescriptor>
Non-null chunks, in file order.
Sourcepub fn find_all(
&self,
chunk_type: ChunkType,
) -> impl Iterator<Item = &ChunkDescriptor>
pub fn find_all( &self, chunk_type: ChunkType, ) -> impl Iterator<Item = &ChunkDescriptor>
Non-null chunks carrying chunk_type, in file order.
Sourcepub fn find(&self, chunk_type: ChunkType) -> Option<&ChunkDescriptor>
pub fn find(&self, chunk_type: ChunkType) -> Option<&ChunkDescriptor>
The first non-null chunk of chunk_type.
Where the specification says a chunk appears at most once (PROF,
LROV, VOXL, ZDIC), readers use the first.
Sourcepub fn contains(&self, chunk_type: ChunkType) -> bool
pub fn contains(&self, chunk_type: ChunkType) -> bool
Whether any non-null chunk carries chunk_type.
Sourcepub fn first_entry_index(&self) -> Option<usize>
pub fn first_entry_index(&self) -> Option<usize>
The index of the first non-null descriptor, i.e. the first chunk.
Sourcepub fn push(&mut self, descriptor: ChunkDescriptor)
pub fn push(&mut self, descriptor: ChunkDescriptor)
Push a descriptor.
Sourcepub fn total_uncompressed_size(&self) -> u64
pub fn total_uncompressed_size(&self) -> u64
The sum of every non-null chunk’s size_uncompressed.
Trait Implementations§
impl Eq for Directory
impl StructuralPartialEq for Directory
Auto Trait Implementations§
impl Freeze for Directory
impl RefUnwindSafe for Directory
impl Send for Directory
impl Sync for Directory
impl Unpin for Directory
impl UnsafeUnpin for Directory
impl UnwindSafe for Directory
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