Last active
January 30, 2019 23:10
-
-
Save earthengine/8881ae521e145ae079b0a998dbd2a055 to your computer and use it in GitHub Desktop.
Ways to make different closures in rust
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
move keyword | State access | State copiable | Closure type | |
---|---|---|---|---|
Yes | By val | No | ClosureOnce | |
Yes | By mut | No | ClosureUniq | |
Yes | By ref | No | ClosureRef | |
Yes | By mut* | Yes | ClosureMutCopy | |
Yes | By val* | Yes | ClosureCopy | |
Yes | By ref* | Yes | ClosureCopy | |
Yes | No state | N/A | Function | |
No | By val | No | ClosureOnce | |
No | By mut | No | ClosureUniq | |
No | By ref | No | ClosureCopy | |
No | By mut* | Yes | ClosureUniq | |
No | By val* | Yes | ClosureCopy | |
No | By ref* | Yes | ClosureCopy | |
No | No state | N/A | Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment