pub struct BucketDescriptorTable {
pub summary: Vec<u64>,
pub non_summary: Vec<u64>,
}Expand description
Parsed bucket-descriptor table: two bucket_index -> file byte offset
maps, one for summary buckets and one for non-summary buckets. Both are
0-based vectors; the on-disk 1-based bucket_index is converted by the
accessor methods.
Fields§
§summary: Vec<u64>Byte offsets of summary buckets, 0-based.
non_summary: Vec<u64>Byte offsets of non-summary buckets, 0-based.
Implementations§
Source§impl BucketDescriptorTable
impl BucketDescriptorTable
Sourcepub fn parse(body: &[u8], sb: &Superblock) -> Result<Self, NsfError>
pub fn parse(body: &[u8], sb: &Superblock) -> Result<Self, NsfError>
Parse the descriptor arrays from a decompressed superblock body.
body must be the superblock body after CX decompression (the
bytes that follow the 100-byte header, as libnsfdb addresses them).
The counts come from the already-parsed Superblock header.
Trait Implementations§
Source§impl Clone for BucketDescriptorTable
impl Clone for BucketDescriptorTable
Source§fn clone(&self) -> BucketDescriptorTable
fn clone(&self) -> BucketDescriptorTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BucketDescriptorTable
impl Debug for BucketDescriptorTable
impl Eq for BucketDescriptorTable
Source§impl PartialEq for BucketDescriptorTable
impl PartialEq for BucketDescriptorTable
Source§fn eq(&self, other: &BucketDescriptorTable) -> bool
fn eq(&self, other: &BucketDescriptorTable) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BucketDescriptorTable
Auto Trait Implementations§
impl Freeze for BucketDescriptorTable
impl RefUnwindSafe for BucketDescriptorTable
impl Send for BucketDescriptorTable
impl Sync for BucketDescriptorTable
impl Unpin for BucketDescriptorTable
impl UnsafeUnpin for BucketDescriptorTable
impl UnwindSafe for BucketDescriptorTable
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