dyn-iter
This tiny crate should help you simplify your code when you need to wrap
Iterator as trait-object.
Imagine for example a trait like the following.
As an implementor, you have a struct Flag that looks like this.
you might implement a fn colors() that look like this
With the above implementation, defining the associated type ColorsIter might
be difficult. DynIter should simplify your life because you can just write the
following implementation.
Behind the scene, DynIter<'iter, V> is only providing a wrapper around a
Box<dyn Iterator<Item = V> + 'iter>.
For more details about why this crate exists, read this blog post.