Glossary: Rust Beyond the Basics
trait
Also written: traits
A named set of methods a type promises to have. Code that knows the trait can use any type that implements it, such as `Shippable`.
Glossary: Rust Beyond the Basics
Also written: traits
A named set of methods a type promises to have. Code that knows the trait can use any type that implements it, such as `Shippable`.