pub trait LayerIterator<K, V>: Send + Sync {
// Required methods
fn advance(&mut self) -> impl Future<Output = Result<(), Error>> + Send
where Self: Sized;
fn advance_dyn<'a>(
&'a mut self,
) -> Result<Option<BoxFuture<'a, Result<(), Error>>>, Error>;
fn get(&self) -> Option<ItemRef<'_, K, V>>;
// Provided method
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 { ... }
}Expand description
Something that implements LayerIterator is returned by the seek function.
Required Methods§
Sourcefn advance(&mut self) -> impl Future<Output = Result<(), Error>> + Sendwhere
Self: Sized,
fn advance(&mut self) -> impl Future<Output = Result<(), Error>> + Sendwhere
Self: Sized,
Advances the iterator (static dispatch, unboxed future).
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".