Skip to main content

BoxedLayerIterator

Type Alias BoxedLayerIterator 

Source
pub type BoxedLayerIterator<'iter, K, V> = Box<dyn LayerIterator<K, V> + 'iter>;

Aliased Type§

pub struct BoxedLayerIterator<'iter, K, V>(/* private fields */);

Trait Implementations§

Source§

impl<'iter, K, V> LayerIterator<K, V> for BoxedLayerIterator<'iter, K, V>

Source§

async fn advance(&mut self) -> Result<(), Error>

Advances the iterator (static dispatch, unboxed future).
Source§

fn advance_dyn<'a>( &'a mut self, ) -> Result<Option<BoxFuture<'a, Result<(), Error>>>, Error>

Advances the iterator for dynamic dispatch (trait objects). If the iterator advances synchronously, returns Ok(None).
Source§

fn get(&self) -> Option<ItemRef<'_, K, V>>

Returns the current item. This will be None if called when the iterator is first crated i.e. before either seek or advance has been called, and None if the iterator has reached the end of the layer.
Source§

fn filter<P>( self, predicate: P, ) -> impl Future<Output = Result<FilterLayerIterator<Self, P, K, V>, Error>> + Send
where P: for<'b> Fn(ItemRef<'b, K, V>) -> bool + Send + Sync, Self: Sized, K: Send + Sync, V: Send + Sync,

Creates an iterator that only yields items from the underlying iterator for which predicate returns true.