struct ByteArrayInterner {
state: RandomState,
map: HashTable<Entry>,
page: Vec<u8>,
}Fields§
§state: RandomState§map: HashTable<Entry>Underlying hash set for each distinct value
page: Vec<u8>Encoded dictionary page: each value prefixed by its length as a u32
Implementations§
Source§impl ByteArrayInterner
impl ByteArrayInterner
fn intern(&mut self, value: &[u8]) -> Result<u64>
Sourcefn is_at(&self, offset: u64, value: &[u8]) -> bool
fn is_at(&self, offset: u64, value: &[u8]) -> bool
Returns whether value is in the dictionary page at offset
fn num_unique_values(&self) -> usize
Sourcefn insert(
&mut self,
value: &[u8],
hash: u64,
inline: Option<OffsetOrInlineView>,
) -> Result<u64>
fn insert( &mut self, value: &[u8], hash: u64, inline: Option<OffsetOrInlineView>, ) -> Result<u64>
Appends value to the dictionary, in the empty slot at pos
fn estimated_memory_size(&self) -> usize
fn iter(&self) -> impl Iterator<Item = &[u8]>
Trait Implementations§
Source§impl Debug for ByteArrayInterner
impl Debug for ByteArrayInterner
Auto Trait Implementations§
impl Freeze for ByteArrayInterner
impl RefUnwindSafe for ByteArrayInterner
impl Send for ByteArrayInterner
impl Sync for ByteArrayInterner
impl Unpin for ByteArrayInterner
impl UnsafeUnpin for ByteArrayInterner
impl UnwindSafe for ByteArrayInterner
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