Struct tantivy_sstable::Streamer
source · pub struct Streamer<'a, TSSTable, A = AlwaysMatch>{ /* private fields */ }
Expand description
Streamer
acts as a cursor over a range of terms of a segment.
Terms are guaranteed to be sorted.
Implementations§
source§impl<'a, TSSTable> Streamer<'a, TSSTable, AlwaysMatch>where
TSSTable: SSTable,
impl<'a, TSSTable> Streamer<'a, TSSTable, AlwaysMatch>where
TSSTable: SSTable,
source§impl<'a, TSSTable, A> Streamer<'a, TSSTable, A>
impl<'a, TSSTable, A> Streamer<'a, TSSTable, A>
sourcepub fn advance(&mut self) -> bool
pub fn advance(&mut self) -> bool
Advance position the stream on the next item.
Before the first call to .advance()
, the stream
is an uninitialized state.
sourcepub fn term_ord(&self) -> TermOrdinal
pub fn term_ord(&self) -> TermOrdinal
Returns the TermOrdinal
of the given term.
May panic if the called as .advance()
as never
been called before.
sourcepub fn key(&self) -> &[u8] ⓘ
pub fn key(&self) -> &[u8] ⓘ
Accesses the current key.
.key()
should return the key that was returned
by the .next()
method.
If the end of the stream as been reached, and .next()
has been called and returned None
, .key()
remains
the value of the last key encountered.
Before any call to .next()
, .key()
returns an empty array.
Auto Trait Implementations§
impl<'a, TSSTable, A> Freeze for Streamer<'a, TSSTable, A>
impl<'a, TSSTable, A = AlwaysMatch> !RefUnwindSafe for Streamer<'a, TSSTable, A>
impl<'a, TSSTable, A> Send for Streamer<'a, TSSTable, A>
impl<'a, TSSTable, A> Sync for Streamer<'a, TSSTable, A>
impl<'a, TSSTable, A> Unpin for Streamer<'a, TSSTable, A>
impl<'a, TSSTable, A = AlwaysMatch> !UnwindSafe for Streamer<'a, TSSTable, 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