pub trait Iterator {
    type Item;

    fn next(&mut self) -> impl Future<Output = Option<Self::Item>>;

    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: FromIterator<Self::Item>>(self) -> B
    where
        Self: Sized
, { ... } }
Expand description

An interface for dealing with iterators.

Required Associated Types

The type of the elements being iterated over.

Required Methods

Advances the iterator and returns the next value.

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.

Transforms an iterator into a collection.

Implementors