Iterator trait
The trait with one required method, next, that every iterator implements.
Iterator declares type Item and fn next(&mut self) -> OptionSelf::Item; every adapter and consumer method is a provided method built on next.
Loading interactive…
Examples
Writing only
fn next(&mut self) -> Option<u64>for aHailstonestruct gives itenumerate,take_while,sumand every other iterator method.
See also