Learning Rust

Here is my personal notes for Rust

mutable ref and immutable ref#

one memory block can only have one mutable ref but it can have multiple immutable ref. Also, once a memory block has one mutable ref, all the immutable refs before that would be invalid.
For my understanding:
Mutable ref is like a “read and write” operation to memory block, while immutable ref is like a “read only” operation to the memory block. Once you have a “read and write” operation(mutable ref), all other “read only” operation(mutable ref) don’t know what happened to that memory block(might be changed by mutable block), so, the result from “read only” operation may not be valid. However, we have to re-create mutable refs.~