Struct tantivy_sstable::StreamerBuilder

source ·
pub struct StreamerBuilder<'a, TSSTable, A = AlwaysMatch>
where A: Automaton, A::State: Clone, TSSTable: SSTable,
{ /* private fields */ }
Expand description

StreamerBuilder is a helper object used to define a range of terms that should be streamed.

Implementations§

source§

impl<'a, TSSTable, A> StreamerBuilder<'a, TSSTable, A>
where A: Automaton, A::State: Clone, TSSTable: SSTable,

source

pub fn ge<T: AsRef<[u8]>>(self, bound: T) -> Self

Limit the range to terms greater or equal to the bound

source

pub fn gt<T: AsRef<[u8]>>(self, bound: T) -> Self

Limit the range to terms strictly greater than the bound

source

pub fn le<T: AsRef<[u8]>>(self, bound: T) -> Self

Limit the range to terms lesser or equal to the bound

source

pub fn lt<T: AsRef<[u8]>>(self, bound: T) -> Self

Limit the range to terms lesser or equal to the bound

source

pub fn limit(self, limit: u64) -> Self

Load no more data than what’s required to to get limit matching entries.

The resulting Streamer can still return marginaly more than limit elements.

source

pub async fn into_stream_async(self) -> Result<Streamer<'a, TSSTable, A>>

See into_stream(..)

source

pub fn into_stream(self) -> Result<Streamer<'a, TSSTable, A>>

Creates the stream corresponding to the range of terms defined using the StreamerBuilder.

Auto Trait Implementations§

§

impl<'a, TSSTable, A> Freeze for StreamerBuilder<'a, TSSTable, A>
where <A as Automaton>::State: Sized, A: Freeze,

§

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

§

impl<'a, TSSTable, A> Send for StreamerBuilder<'a, TSSTable, A>
where <A as Automaton>::State: Sized, A: Send, TSSTable: Sync,

§

impl<'a, TSSTable, A> Sync for StreamerBuilder<'a, TSSTable, A>
where <A as Automaton>::State: Sized, A: Sync, TSSTable: Sync,

§

impl<'a, TSSTable, A> Unpin for StreamerBuilder<'a, TSSTable, A>
where <A as Automaton>::State: Sized, A: Unpin,

§

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

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.