· 3 min read

Memorize Rust Ownership and Borrowing: 48 Flashcards from the Three Rules to Arc and Mutex

Learn Rust with 48 real flashcards: ownership rules, borrowing, String vs str, Option, Result, the question-mark operator, Box, Rc, Arc, traits and unsafe.

Flat vector illustration of a geometric crab built from gears and chain links, surrounded by floating flashcards

Studying. But it's also a video game. 🎮

Flashcards, quizzes and games that make you actually remember.

Start playing — it's free

Posted by

Rust's learning curve is not spread evenly across the language. It is concentrated in three ideas — ownership, borrowing and lifetimes — that have no equivalent in Go, Python or Java. The Rust Essentials deck (code JD2252, 48 cards) is built around that fact: roughly a third of the cards exist to make the borrow checker predictable, and the rest give you the syntax and standard-library vocabulary you need around it.

Study this deck: Rust Essentials

1 / 10
Question

Rust

Knew itLearning

Tap the card for the answer · swipe right if you knew it, left if not

Eight cards that carry the deck

Card frontWhat you have to recall
Three ownership rulesEach value has exactly one owner; the value is dropped when its owner goes out of scope; a move transfers ownership
Borrowing rulesAny number of &T, or exactly one &mut T — never both at once. Data races become compile errors
String vs &strString is owned, heap-allocated and growable; &str is a borrowed, immutable, fixed-size slice
Option<T>Some(T) or None — Rust's replacement for null, and match forces you to handle both arms
The ? operatorEarly-returns on Err (and on None, with Option) instead of nesting matches
Box, Rc and ArcHeap with a single owner; reference counting for multiple owners; atomic reference counting for threads
Three closure traitsFn borrows immutably, FnMut borrows mutably, FnOnce takes ownership and runs once
iter vs iter_mut vs into_iter&T, &mut T, T — the borrowing distinction again, applied to iteration

Everything the 48 cards cover

You will drill: ownership and moves, immutable and mutable borrows, lifetime annotations, structs and impl blocks, data-carrying enum variants, match with ranges and the _ arm, traits, the derive attribute, associated types, generics with trait bounds, Vec versus fixed-size arrays, Copy versus Clone, RefCell and interior mutability, Mutex, thread::spawn and move, panic! versus Result, unwrap and expect, async/await, macro_rules!, modules and pub, crates and Cargo commands, raw pointers, unsafe blocks, and the Drop trait.

Study it in three passes, not one

Pass one — the safety core. Ownership, borrowing, String/&str, Option, Result, the ? operator. Nothing else in Rust makes sense until these are automatic.

Pass two — the abstraction layer. Structs, enums, traits, generics, closures, iterators, derive. They behave like any modern language and go fast once pass one is solid.

Pass three — concurrency and escape hatches. Arc<Mutex<T>>, threads, RefCell, raw pointers, unsafe, async. Leave them last: they only make sense as consequences of the ownership rules.

Two tips specific to this deck

Type the code cards into the compiler. Two backs in this deck do not actually compile. The Borrowing in Rust card shows let s = String::from("hello"); followed by both let r = &s; and let r = &mut s; — s was never declared mut, and the two borrows shown side by side violate the rule the very next card states. The Raw pointers card has the same flaw, taking &mut x from a plain let x = 5. Paste both into the Rust Playground, read the error, and rewrite the back with the fixed version. A borrow-checker error you produced yourself is worth ten readings.

Restore the real casing on the code fronts. The generator sentence-cased several of them: Unwrap() is really unwrap(). Others read as labels rather than questions (Iterate in Rust, Spawn threads in Rust, Struct in Rust). Turn each one into "how do I…" out loud and answer by writing the snippet from memory instead of recognising it.

For a useful contrast — Go solves memory management by refusing the problem — see the Go Essentials study guide.

The deck is JD2252 — Rust Essentials in the Flip It library.

Ready to learn faster? 🚀

Join FLIP IT for free and turn studying into a game.

Create my free account