A trait defines the functionality
a particular type has
and can share with other types
Traits don't exist
We can use traits
to define shared behavior
in an abstract way
Traits don't exist
We can use trait bounds to specify
that a generic type can be any type
that has certain behavior
Traits don't exist
Traits are similar to a feature
often called interfaces in other languages
although with some differences
Traits don't exist
Trait definitions are a way to group method signatures together
to define a set of behaviors
necessary to accomplish some purpose
Traits don't exist
A trait can have multiple methods in its body
the method signatures are listed one per line
and each line ends in a semicolon
Traits don't exist
A poem from the book. Inspired by barafael.