This is probably the most important chapter in this book. Here we describe in detail the unique way in which the Rust borrow checker mechanism detects problems at compile time to prevent memory safety errors. It is fundamental to all else in Rust--the language is focused on these concepts of ownership and borrowing. Some of this material has already been discussed earlier, but here we deepen and strengthen that foundation.
We will cover the following topics:
- Pointers and references
- Ownership and borrowing
- Boxes
- Reference counting
- Overview of pointers
Trying out and experimenting with the examples is key here, as there are many concepts that you may not be familiar with yet.