Glossary: Software Design Patterns in Rust
Trait
Also written: traits
A named set of methods a type promises to have, written with `trait` and implemented with `impl`. It is Rust's interface and replaces inheritance for shared behavior.
Glossary: Software Design Patterns in Rust
Also written: traits
A named set of methods a type promises to have, written with `trait` and implemented with `impl`. It is Rust's interface and replaces inheritance for shared behavior.