Last active
January 30, 2019 23:23
-
-
Save earthengine/790e3d6512da5e9debc984d22d927328 to your computer and use it in GitHub Desktop.
Rust closures
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name | Call mode | State mutate | Copy | Other ability | Traits can be implemented | Traits implemented | |
---|---|---|---|---|---|---|---|
Function | Parallel/reentranted | No | Yes | Cast to fn | Fn + FnMut + FnOnce + Copy | Fn + FnMut + FnOnce + Copy | |
ClosureMutCopy | Parallel/reentranted | Yes | Yes | State snapshot | Fn + FnMut(multiple) + FnOnce + Copy | FnMut + FnOnce + Copy | |
ClosureCopy | Parallel/reentranted | No/Meaningless | Yes | N/A | Fn + FnMut + FnOnce + Copy | Fn + FnMut + FnOnce + Copy | |
ClosureRef | Parallel/reentranted | No | No | N/A | Fn + FnMut + FnOnce | Fn + FnMut + FnOnce | |
ClosureUniq | Sequencial | Yes | No | N/A | FnMut + FnOnce | FnMut + FnOnce | |
ClosureOnce | Once only | Meaningless | No | N/A | FnOnce | FnOnce |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment