[−][src]Struct tantivy::termdict::TermStreamer
TermStreamer
acts as a cursor over a range of terms of a segment.
Terms are guaranteed to be sorted.
Methods
impl<'a, A> TermStreamer<'a, A> where
A: Automaton,
[src]
A: Automaton,
pub fn advance(&mut self) -> bool
[src]
Advance position the stream on the next item.
Before the first call to .advance()
, the stream
is an unitialized state.
pub fn term_ord(&self) -> TermOrdinal
[src]
Returns the TermOrdinal
of the given term.
May panic if the called as .advance()
as never
been called before.
pub fn key(&self) -> &[u8]
[src]
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.
pub fn value(&self) -> &TermInfo
[src]
Accesses the current value.
Calling .value()
after the end of the stream will return the
last .value()
encountered.
Panics
Calling .value()
before the first call to .advance()
returns
V::default()
.
pub fn next(&mut self) -> Option<(&[u8], &TermInfo)>
[src]
Return the next (key, value)
pair.
Auto Trait Implementations
impl<'a, A = AlwaysMatch> !RefUnwindSafe for TermStreamer<'a, A>
impl<'a, A> Send for TermStreamer<'a, A> where
A: Send,
<A as Automaton>::State: Send,
A: Send,
<A as Automaton>::State: Send,
impl<'a, A> Sync for TermStreamer<'a, A> where
A: Sync,
<A as Automaton>::State: Sync,
A: Sync,
<A as Automaton>::State: Sync,
impl<'a, A> Unpin for TermStreamer<'a, A> where
A: Unpin,
<A as Automaton>::State: Unpin,
A: Unpin,
<A as Automaton>::State: Unpin,
impl<'a, A = AlwaysMatch> !UnwindSafe for TermStreamer<'a, A>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T> Fruit for T where
T: Send + Downcast,
[src]
T: Send + Downcast,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,