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 /Dereferencing is to access the data behind a pointer.md | |
parent | f43372529e655f3b039946c969e4465193eb2042 (diff) |
vault backup: 2025-08-05 08:53:21
Diffstat (limited to 'Dereferencing is to access the data behind a pointer.md')
-rw-r--r-- | Dereferencing is to access the data behind a pointer.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Dereferencing is to access the data behind a pointer.md b/Dereferencing is to access the data behind a pointer.md new file mode 100644 index 0000000..73cbeee --- /dev/null +++ b/Dereferencing is to access the data behind a pointer.md @@ -0,0 +1,10 @@ +[[Rust]] +[[Ownership]] +[[References are also immutable by default]] +[[Accessed data from dereferencing a pointer cannot be mutated]] + +--- + +The dereference operator is similar as in Go an asterisk. By dereferencing a pointer it is possible to access the data it points to. + +When you use the dereference operator in an assignment the variable has the same value as what the pointer holds.
\ No newline at end of file |