book: define trait

This commit is contained in:
Tshepang Lekhonkhobe 2015-06-09 02:32:29 +02:00
parent 20cf4cf62c
commit e2a1afa1c2

View file

@ -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]?