blob: 73cbeee44196fdf97835eb64ce1a59142ee2ff54 (
plain)
1
2
3
4
5
6
7
8
9
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.
|