Rust: Traits
A trait
is a collection of methods defined for an unknown type: Self
.
They can access other methods declared in the same trait
, and can be
implemented for any data type.
A trait
is a collection of methods defined for an unknown type: Self
.
They can access other methods declared in the same trait
, and can be
implemented for any data type.