trait
A named set of abilities a type can have, like Debug or Clone.
A trait defines methods types can implement; it is taught fully in the traits chapter.
Examples
Printing a struct with
{:?}fails with E0277 until it implements theDebugtrait, for example through#[derive(Debug)].
See also