pub struct PostingListReader<'a> { /* private fields */ }Expand description
Iterates over a posting list, yielding (DocId, term_frequency) pairs.
Handles both the original format and the position-aware format. When reading position-aware data, positions are skipped automatically.
Implementations§
Source§impl<'a> PostingListReader<'a>
impl<'a> PostingListReader<'a>
Sourcepub fn new(data: &'a [u8]) -> Self
pub fn new(data: &'a [u8]) -> Self
Create a reader from encoded posting list bytes.
Handles both the original format (no positions) and the position-aware
format (with flags byte). When reading position-aware data, positions
are skipped — only doc_id and tf are returned. Use
PositionPostingListReader to read positions.
Auto Trait Implementations§
impl<'a> Freeze for PostingListReader<'a>
impl<'a> RefUnwindSafe for PostingListReader<'a>
impl<'a> Send for PostingListReader<'a>
impl<'a> Sync for PostingListReader<'a>
impl<'a> Unpin for PostingListReader<'a>
impl<'a> UnsafeUnpin for PostingListReader<'a>
impl<'a> UnwindSafe for PostingListReader<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more