diff options
author | Jasper Ras <jras@hostnet.nl> | 2025-08-05 08:53:21 +0200 |
---|---|---|
committer | Jasper Ras <jras@hostnet.nl> | 2025-08-05 08:53:21 +0200 |
commit | 295b343aecf330e830d79f06e0efc511e7d76da1 (patch) | |
tree | 85057ef1fe401adcd0d958ddf6ff966f25d8fef0 /Variables are subject to permissions similar to files on linux.md | |
parent | f43372529e655f3b039946c969e4465193eb2042 (diff) |
vault backup: 2025-08-05 08:53:21
Diffstat (limited to 'Variables are subject to permissions similar to files on linux.md')
-rw-r--r-- | Variables are subject to permissions similar to files on linux.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Variables are subject to permissions similar to files on linux.md b/Variables are subject to permissions similar to files on linux.md new file mode 100644 index 0000000..5a47739 --- /dev/null +++ b/Variables are subject to permissions similar to files on linux.md @@ -0,0 +1,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".
\ No newline at end of file |