typeover
rust curriculum

Curriculum Ownership & borrowing

module 2 of 7

Ownership & borrowing

Rust's core alien model. Moves, copies, references, mutable borrows, slices, String vs &str, and enough lifetime intuition to make the borrow checker feel like a set of rules rather than a personality.

Themes

TypeScript variables point at values managed by a garbage collector; Rust bindings own values unless the type is Copy. This theme makes moves concrete before references appear. P…

9 ready

begin →

Borrowing is how Rust lets code inspect data without taking it. &T references are shared, read-only views whose owner remains somewhere else. Planned exercises: 1. choose `&Strin…

9 ready

begin →

The borrow checker's headline rule is simple but unfamiliar: many shared borrows or one mutable borrow, never both at the same time. This theme teaches &mut T, reborrowing, and s…

9 ready

begin →

Rust has owned strings (String) and borrowed string slices (&str). The same borrowed-view idea applies to slices like &[T]. This theme teaches the signature reflex: accept `&…

9 ready

begin →

Lifetimes are not a separate runtime feature; they describe how long references are valid. This theme avoids advanced annotation syntax at first and focuses on why Rust rejects dan…

9 ready

begin →