pub trait AsyncIterator {
type Item;
// Required method
async fn next(&mut self) -> Option<Self::Item>;
// Provided methods
fn size_hint(&self) -> (usize, Option<usize>) { ... }
fn map<B, F>(self, f: F) -> Map<Self, F>
where Self: Sized,
F: FnMut(Self::Item) -> B { ... }
async fn collect<B>(self) -> B
where B: FromIterator<Self::Item>,
Self: Sized { ... }
fn lend(self) -> Lend<Self>
where Self: Sized { ... }
fn lend_mut(self) -> LendMut<Self>
where Self: Sized { ... }
}Expand description
The async iterator trait implemented by WorkListIterator.
Re-exported so callers can drive deep paging without depending on
async-iterator directly.
An interface for dealing with iterators.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator.
Sourcefn map<B, F>(self, f: F) -> Map<Self, F>
fn map<B, F>(self, f: F) -> Map<Self, F>
Takes a closure and creates an iterator which calls that closure on each element.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".