Trait async_iterator::Iterator
source · [−]pub trait Iterator {
type Item;
fn next<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<Self::Item>> + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
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,
{ ... }
fn collect<'async_trait, B>(
self
) -> Pin<Box<dyn Future<Output = B> + 'async_trait>>
where
Self: Sized,
B: 'async_trait + FromIterator<Self::Item>,
Self: 'async_trait,
{ ... }
}
Expand description
An interface for dealing with iterators.
Required Associated Types
Required Methods
Provided Methods
Returns the bounds on the remaining length of the iterator.
Takes a closure and creates an iterator which calls that closure on each element.