Struct tantivy_bitpacker::BitUnpacker
source · pub struct BitUnpacker { /* private fields */ }
Implementations§
source§impl BitUnpacker
impl BitUnpacker
sourcepub fn new(num_bits: u8) -> BitUnpacker
pub fn new(num_bits: u8) -> BitUnpacker
Creates a bit unpacker, that assumes the same bitwidth for all values.
The bitunpacker works by doing an unaligned read of 8 bytes.
For this reason, values of num_bits
between
[57..63] are forbidden.
pub fn bit_width(&self) -> u8
pub fn get(&self, idx: u32, data: &[u8]) -> u64
pub fn get_ids_for_value_range( &self, range: RangeInclusive<u64>, id_range: Range<u32>, data: &[u8], positions: &mut Vec<u32> )
Trait Implementations§
source§impl Clone for BitUnpacker
impl Clone for BitUnpacker
source§fn clone(&self) -> BitUnpacker
fn clone(&self) -> BitUnpacker
Returns a copy of the value. Read more
1.0.0 · 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 BitUnpacker
impl Debug for BitUnpacker
source§impl Default for BitUnpacker
impl Default for BitUnpacker
source§fn default() -> BitUnpacker
fn default() -> BitUnpacker
Returns the “default value” for a type. Read more
impl Copy for BitUnpacker
Auto Trait Implementations§
impl Freeze for BitUnpacker
impl RefUnwindSafe for BitUnpacker
impl Send for BitUnpacker
impl Sync for BitUnpacker
impl Unpin for BitUnpacker
impl UnwindSafe for BitUnpacker
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