Iter

Trait Iter 

Source
pub trait Iter: CollectionRef {
    type Iter<'a>: Iterator<Item = Self::ItemRef<'a>>
       where Self: 'a;

    // Required method
    fn iter(&self) -> Self::Iter<'_>;
}
Expand description

Iterable collection.

Required Associated Types§

Source

type Iter<'a>: Iterator<Item = Self::ItemRef<'a>> where Self: 'a

Iterator type.

Required Methods§

Source

fn iter(&self) -> Self::Iter<'_>

Create an iterator over the items of the collection.

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.

Implementations on Foreign Types§

Source§

impl<K, V> Iter for BTreeMap<K, V>

Source§

type Iter<'a> = Values<'a, K, V> where Self: 'a

Source§

fn iter(&self) -> Self::Iter<'_>

Source§

impl<K, V> Iter for HashMap<K, V>

Source§

type Iter<'a> = Values<'a, K, V> where Self: 'a

Source§

fn iter(&self) -> Self::Iter<'_>

Source§

impl<T> Iter for BTreeSet<T>

Source§

type Iter<'a> = Iter<'a, T> where Self: 'a

Source§

fn iter(&self) -> Self::Iter<'_>

Source§

impl<T> Iter for Vec<T>

Source§

type Iter<'a> = Iter<'a, T> where Self: 'a

Source§

fn iter(&self) -> Self::Iter<'_>

Source§

impl<T> Iter for HashSet<T>

Source§

type Iter<'a> = Iter<'a, T> where Self: 'a

Source§

fn iter(&self) -> Self::Iter<'_>

Implementors§