As we've seen already, traits are an important part of the Rust ecosystem. The traits that are built into the Rust standard library affect many things, including even what operators can be used on a particular data value. In this chapter, we're going to review many of these traits, and see how to implement them on our own data types.
In this chapter, we're going to do the following:
- Look at an assortment of traits defined by the Rust standard library
- Learn about the meanings and implications of those traits
- Learn about what traits are applied automatically
- Learn how to use the derive command to generate trait implementations for select traits
- Learn how to manually implement the remaining traits