AsyncIterator

Trait AsyncIterator 

Source
pub trait AsyncIterator {
    type Item;

    // Required method
    async fn next(&mut self) -> Option<Self::Item>;
}
Expand description

A trait for dealing with async iterators.

Required Associated Types§

Source

type Item

The type of the elements being iterated over.

Required Methods§

Source

async fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§