higher-kinded types

最经典的例子:
trait StreamingIterator {
type Item<'a>;
fn next<'a>(&'a mut self) -> Option<Self::Item<'a>>;
}

This trait is very useful - it allows for a kind of Iterator which yields values which have a lifetime tied to the lifetime of the reference passed to next.

A particular obvious use case for this trait would be an iterator over a vector which yields overlappi