Trait Iterator

Source
pub trait Iterator {
    type Item;

    // Required method
    fn next(&mut self) -> Option<Self::Item>;

    // Provided method
    fn size_hint(&self) -> (usize, Option<usize>) { ... }
}
Expand description

A stateful iterator returned by Iterate::iterate.

Required Associated Types§

Source

type Item

The type of the elements being iterated over.

Required Methods§

Source

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value.

Provided Methods§

Source

fn size_hint(&self) -> (usize, Option<usize>)

How many items do we expect to yield?

Implementors§

Source§

impl<B, I: Iterator, F> Iterator for Map<I, F>
where F: FnMut(I::Item) -> B,

Source§

type Item = B