In the Rust Book, there isn’t an explicit introduction explaining that traits can be generic. Chapter 10 introduces traits, but it does not cover generic traits. The ability to use generics with traits is only shown later, in Chapter 19 under the “Advanced Traits” section, and even there it is not formally highlighted. In contrast, Rust By Example explicitly states that traits can be generic. It would be helpful to have a clear introduction to generic traits earlier in the book.
In the Rust Book, there isn’t an explicit introduction explaining that traits can be generic. Chapter 10 introduces traits, but it does not cover generic traits. The ability to use generics with traits is only shown later, in Chapter 19 under the “Advanced Traits” section, and even there it is not formally highlighted. In contrast, Rust By Example explicitly states that traits can be generic. It would be helpful to have a clear introduction to generic traits earlier in the book.