ContainerIter

Trait ContainerIter 

Source
pub trait ContainerIter<T>: Container<T>
where Self::Cont<T>: RawSpace<Elem = T>,
{ type Iter<'a, U>: Iterator<Item = &'a U> where Self: 'a, U: 'a; // Required method fn iter(&self) -> Self::Iter<'_, T>; }
Expand description

The ContainerIter trait extends the Container trait to provide an interface for obtaining iterators over the elements of the container.

Required Associated Types§

Source

type Iter<'a, U>: Iterator<Item = &'a U> where Self: 'a, U: 'a

Required Methods§

Source

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

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<T> ContainerIter<T> for &[T]

Source§

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

Source§

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

Source§

impl<T> ContainerIter<T> for [T]

Source§

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

Source§

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

Source§

impl<const N: usize, T> ContainerIter<T> for [T; N]

Source§

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

Source§

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

Implementors§