Struct tantivy_fst::map::Stream
source · pub struct Stream<'m, A = AlwaysMatch>(/* private fields */)
where
A: Automaton;
Expand description
A lexicographically ordered stream of key-value pairs from a map.
The A
type parameter corresponds to an optional automaton to filter
the stream. By default, no filtering is done.
The 'm
lifetime parameter refers to the lifetime of the underlying map.
Implementations§
source§impl<'m, A: Automaton> Stream<'m, A>
impl<'m, A: Automaton> Stream<'m, A>
sourcepub fn into_byte_vec(self) -> Vec<(Vec<u8>, u64)>
pub fn into_byte_vec(self) -> Vec<(Vec<u8>, u64)>
Convert this stream into a vector of byte strings and outputs.
Note that this creates a new allocation for every key in the stream.
sourcepub fn into_str_vec(self) -> Result<Vec<(String, u64)>>
pub fn into_str_vec(self) -> Result<Vec<(String, u64)>>
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.
sourcepub fn into_byte_keys(self) -> Vec<Vec<u8>>
pub fn into_byte_keys(self) -> Vec<Vec<u8>>
Convert this stream into a vector of byte strings.
Note that this creates a new allocation for every key in the stream.
sourcepub fn into_str_keys(self) -> Result<Vec<String>>
pub fn into_str_keys(self) -> Result<Vec<String>>
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.
sourcepub fn into_values(self) -> Vec<u64>
pub fn into_values(self) -> Vec<u64>
Convert this stream into a vector of outputs.