[][src]Struct tantivy_fst::raw::Stream

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

A lexicographically ordered stream of key-value pairs from an fst.

The A type parameter corresponds to an optional automaton to filter the stream. By default, no filtering is done.

The 'f lifetime parameter refers to the lifetime of the underlying fst.

Methods

impl<'f, A: Automaton> Stream<'f, A>[src]

pub fn into_byte_vec(self) -> Vec<(Vec<u8>, u64)>[src]

Convert this stream into a vector of byte strings and outputs.

Note that this creates a new allocation for every key in the stream.

pub fn into_str_vec(self) -> Result<Vec<(String, u64)>>[src]

Convert this stream into a vector of Unicode strings and outputs.

If any key is not valid UTF-8, then iteration on the stream is stopped and a UTF-8 decoding error is returned.

Note that this creates a new allocation for every key in the stream.

pub fn into_byte_keys(self) -> Vec<Vec<u8>>[src]

Convert this stream into a vector of byte strings.

Note that this creates a new allocation for every key in the stream.

pub fn into_str_keys(self) -> Result<Vec<String>>[src]

Convert this stream into a vector of Unicode strings.

If any key is not valid UTF-8, then iteration on the stream is stopped and a UTF-8 decoding error is returned.

Note that this creates a new allocation for every key in the stream.

pub fn into_values(self) -> Vec<u64>[src]

Convert this stream into a vector of outputs.

Trait Implementations

impl<'f, 'a, A: Automaton> Streamer<'a> for Stream<'f, A>[src]

type Item = (&'a [u8], Output)

The type of the item emitted by this stream.

Auto Trait Implementations

impl<'f, A> Send for Stream<'f, A> where
    A: Send,
    <A as Automaton>::State: Send

impl<'f, A> Sync for Stream<'f, A> where
    A: Sync,
    <A as Automaton>::State: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.