Rust · Trait
IntoIterator
IntoIterator defines how a value becomes an iterator. It specifies the yielded item type and the iterator type, and it enables use with for loops.
Last updated
- Since
- 1.0.0
Syntax
pub trait IntoIterator {
type Item;
type IntoIter: Iterator<Item = Self::Item>;
fn into_iter(self) -> Self::IntoIter;
}In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
IteratorFromIteratorstd::vec::IntoIterstd::slice::Iterstd::slice::IterMut