book: define trait
This commit is contained in:
parent
20cf4cf62c
commit
e2a1afa1c2
1 changed files with 3 additions and 0 deletions
|
|
@ -1,5 +1,8 @@
|
|||
% Traits
|
||||
|
||||
A trait is a language feature that tells the Rust compiler about
|
||||
functionality a type must provide.
|
||||
|
||||
Do you remember the `impl` keyword, used to call a function with [method
|
||||
syntax][methodsyntax]?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue