Trait lrs::iter::IntoIterator

Objects that can be turned into iterators.

Syntax

trait IntoIterator
    where <<Self as IntoIterator>::IntoIter as Iterator>::Item = <Self as IntoIterator>::Item,
{
    type IntoIter: Iterator;
    type Item;

    /* Required methods */
    fn into_iter(self) -> <Self as IntoIterator>::IntoIter
}

Associated types

NameDescription
IntoIter

The type of the iterator this object can be turned into.

Item

The type that the iterator yields.

Methods

ReceiverNameDescription
selfinto_iter

Turns the object into an iterator.

Remarks

This is the trait used by for loops. The object on the right-hand-side has to implement this trait. All iterators implement this trait and simply return themselves.