| ▲ | yoshuaw 2 hours ago | |
> I always forget the order of precedence for FnOnce/Fn/FnMut The way I remember the ordering is by thinking about the restrictions the various Fn traits provide from a caller's perspective:
So going from most to least restrictive gives you `FnMut: FnOnce` and `Fn: FnMut`. | ||
| ▲ | umanwizard 2 hours ago | parent [-] | |
Fn can only be called concurrently if its environment is Sync, which is often true but not necessarily. It’s more precise to say that Fn can be called even when you only have shared access to it, which is a necessary, but not sufficient, condition for being able to be called concurrently. | ||