What Is a Trait?
A contract of required methods.
Behavior You Can Share
Sometimes many types need the same ability, like being printable. A trait lets you describe that shared behavior once. 🤝
A Contract of Methods
Think of a trait as a contract: it lists the methods a type must provide, without saying how they work.