blob: 5a477391e8ba8d14a483e1fc2f70c2a4ba116e1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
[[Rust]]
[[A place is anything that is valid to put on the left-hand side of an assignment]]
[[Lifetime specifier]]
---
Rust has a permission system similar to file permissions for variables:
- R: read: data can be copied
- W: write: data can be mutated
- O: own: data can be moved or dropped
- F: Flow: expected when a function input uses a reference or when a function returns a reference
The default is : "RO". `mut` adds "W".
|