If you have a lot of complex logic to perform in the iterator and want to separate it a bit from your collection, you can do so by providing your collection with the IntoIterator trait instead. This would allow you to return a struct specifically made for your iteration, which itself provides the Iterator trait.