
Generics
Impl Trait Versus dyn Trait in Rust Arguments and Returns
In argument position impl Trait is a generic, in return position it hides one concrete type, and dyn Trait is for several. Here is how to pick in each place.
7 min read
Tag
1 post

In argument position impl Trait is a generic, in return position it hides one concrete type, and dyn Trait is for several. Here is how to pick in each place.