Here are a few extra things I wish I knew when I started messing with Rust's iteration traits, in addition to what your tour of Rust traits already contains:
Iterator is one of those few traits where you should really consider overloading the default implementation of some methods (size_hint, nth...), as it is suboptimal in many cases.
Extend is a thing and FromIterator should almost always be implemented in terms of it.
Here are a few extra things I wish I knew when I started messing with Rust's iteration traits, in addition to what your tour of Rust traits already contains:
Iterator
is one of those few traits where you should really consider overloading the default implementation of some methods (size_hint, nth...), as it is suboptimal in many cases.Extend
is a thing andFromIterator
should almost always be implemented in terms of it.