
Generics
Associated Types Versus Generic Parameters in Rust Traits
Use an associated type when each implementor has exactly one answer and a generic parameter when a type can implement the trait many ways. The Iterator and From traits show both.
7 min read