Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PART 3 - The Heart of Rust

Part Opener

The Heart of Rust

Ownership, borrowing, lifetimes, moves, Copy, Clone, Drop, stack versus heap, and the borrow checker. Not separate topics — one resource model seen from different angles. This part is the center of the handbook.

Ownership Borrowing Lifetimes Borrow Checker
Concept Map

Part 3 — One Model, Six Surfaces

Resource Model Ch 16: RAII / Drop Ch 17 Ch 18: Lifetimes Ch 19: Stack / Heap Ch 20 Ch 21: Borrow Checker
Big Picture

The Gatekeeper: Strict Rules, Sound Code

Refused use after move overlapping &mut + &T dangling reference double free Allowed single owner, clean drop many &T readers, no writer one &mut writer, no readers reference within owner's life The borrow checker enforces these at compile time.

This part is the center of the handbook.

If you understand Part 3 deeply, the rest of Rust stops looking like a list of disconnected rules. Traits make sense. Async makes sense. Smart pointers make sense. Even many compiler errors stop feeling arbitrary. If you do not understand Part 3, the rest of the language becomes a series of local tricks and workarounds.

The core claim of this part is simple:

ownership, borrowing, lifetimes, moves, Copy, Clone, Drop, stack versus heap, and the borrow checker are not separate topics. They are one resource model seen from different angles.


Chapters in This Part


Part 3 Summary

Ownership is Rust’s resource model. Borrowing is Rust’s access model. Lifetimes are Rust’s borrowed-relationship model. Moves, Copy, Clone, and Drop are lifecycle events inside that model. Stack versus heap explains the physical representation underneath it. The borrow checker is the compiler enforcing all of it over control flow.

These are not six topics. They are one coherent design. Once you see that coherence, Rust stops feeling like a language of special cases and starts feeling like a language with one deep rule taught through many surfaces.