Trait IntoIterator

Source
pub trait IntoIterator {
    type Item;
    type IntoIter: Iterator<Item = Self::Item>;

    // Required method
    async fn into_iter(self) -> Self::IntoIter;
}
Expand description

Conversion into an Iterator.

Required Associated Types§

Source

type Item

The type of the elements being iterated over.

Source

type IntoIter: Iterator<Item = Self::Item>

Which kind of iterator are we turning this into?

Required Methods§

Source

async fn into_iter(self) -> Self::IntoIter

Creates an iterator from a 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§