[][src]Struct tantivy::termdict::TermStreamer

pub struct TermStreamer<'a, A = AlwaysMatch> where
    A: Automaton
{ /* fields omitted */ }

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]

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> Send for TermStreamer<'a, A> where
    A: Send,
    <A as Automaton>::State: Send

impl<'a, A> Sync for TermStreamer<'a, A> where
    A: Sync,
    <A as Automaton>::State: Sync

impl<'a, A> Unpin for TermStreamer<'a, A> where
    A: Unpin,
    <A as Automaton>::State: Unpin

impl<'a, A = AlwaysMatch> !UnwindSafe for TermStreamer<'a, A>

impl<'a, A = AlwaysMatch> !RefUnwindSafe for TermStreamer<'a, A>

Blanket Implementations

impl<T> Fruit for T where
    T: Send + Downcast
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]