reference: 'inherits' is more clear than 'implies'
This commit is contained in:
parent
912ab64a0d
commit
10e762eaad
1 changed files with 4 additions and 3 deletions
|
@ -3517,13 +3517,14 @@ more of the closure traits:
|
|||
|
||||
* `FnMut`
|
||||
: The closure can be called multiple times as mutable. A closure called as
|
||||
`FnMut` can mutate values from its environment. `FnMut` implies
|
||||
`FnOnce`.
|
||||
`FnMut` can mutate values from its environment. `FnMut` inherits from
|
||||
`FnOnce` (i.e. anything implementing `FnMut` also implements `FnOnce`).
|
||||
|
||||
* `Fn`
|
||||
: The closure can be called multiple times through a shared reference.
|
||||
A closure called as `Fn` can neither move out from nor mutate values
|
||||
from its environment. `Fn` implies `FnMut` and `FnOnce`.
|
||||
from its environment. `Fn` inherits from `FnMut`, which itself
|
||||
inherits from `FnOnce`.
|
||||
|
||||
|
||||
### Trait objects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue