Objects that can be turned into iterators.
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
}| Name | Description |
|---|---|
| IntoIter | The type of the iterator this object can be turned into. |
| Item | The type that the iterator yields. |
| Receiver | Name | Description |
|---|---|---|
self | into_iter | Turns the object into an iterator. |
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.