When is it appropriate to use an associated type versus a generic type?
This is now touched on in the second edition of The Rust Programming Language. However, let’s dive in a bit in addition. Let us start with a simpler example. When is it appropriate to use a trait method? There are multiple ways to provide late binding: trait MyTrait { fn hello_word(&self) -> String; } Or: … Read more