Struct tantivy::positions::PositionReader [−][src]
pub struct PositionReader { /* fields omitted */ }
Expand description
When accessing the position of a term, we get a positions_idx from the Terminfo
.
This means we need to skip to the nth
positions efficiently.
Blocks are compressed using bitpacking, so skip_read
contains the number of bits
(values can go from 0bit to 32 bits) required to decompress every block.
A given block obviously takes (128 x num_bit_for_the_block / num_bits_in_a_byte)
,
so skipping a block without decompressing it is just a matter of advancing that many
bytes.
Implementations
Open and reads the term positions encoded into the positions_data owned bytes.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for PositionReader
impl Send for PositionReader
impl Sync for PositionReader
impl Unpin for PositionReader
impl !UnwindSafe for PositionReader
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
pub fn vzip(self) -> V