Rust Traits
2024-11-12 22:07:03 +0000
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.