pub struct IndexData {
pub header: IndexHeader,
pub partition_entries: Vec<PartitionIndexEntry>,
pub key_lookup: HashMap<Arc<[u8]>, usize>,
}Expand description
Complete Index.db data structure
Fields§
§header: IndexHeaderFile header
partition_entries: Vec<PartitionIndexEntry>All partition index entries
key_lookup: HashMap<Arc<[u8]>, usize>Lookup table for efficient partition access - uses Arc<u8> as key type
§Zero-Copy Design (Issue #107, Problem 1)
- Keys are
Arc<[u8]>to enable reference counting without cloning digest bytes - Lookups use
&[u8]directly via Borrow trait (zero heap allocations) Arc<[u8]>implementsBorrow<[u8]>enabling HashMap::get(&u8) without temporary Arc creation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexData
impl RefUnwindSafe for IndexData
impl Send for IndexData
impl Sync for IndexData
impl Unpin for IndexData
impl UnsafeUnpin for IndexData
impl UnwindSafe for IndexData
Blanket Implementations§
impl<T> Allocation for T
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