To recap: an iterator is a pattern to traverse a collection, providing a pointer to each element in the process. This pattern is mentioned in the book Design Patterns, by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (the Gang of Four), in 1994 and can be found in basically every language one way or another.
In Rust, the term pointer to each element gets a new dimension: is it a borrowed or owned item? Can this be mutably borrowed as well?
Using the standard library's Iterator<T> trait makes a lot of sense, since it provides a serious amount of useful functions, which are all based around a single implementation of next().
next() returns an Option<Self::Item>, which is the associated type that has to be declared when implementing the trait—and it can be anything you like!
Therefore, using &MyType, &mut MyType, and MyType can all be implemented separately to achieve the desired functionality. IntoIter<T> is a trait that is specifically...