September 6, 2026· ~6 min readModule 5 — Enums & Pattern Matching ## Enums: Variants with Data From [Module 4](/content/rust/module-04-structs-methods/) you know structs: all fields at once. An enum is the opposite
September 6, 2026· ~5 min readModule 6 — Collections ## Vec — the workhorse The Vec is Rust's standard list: growing elements of the same type, stored contiguously on the heap: ```rust fn main() {
September 6, 2026· ~5 min readModule 7 — Error Handling ## Typing errors: custom error enums In [Module 5](/content/rust/module-05-enums-pattern-matching/) you learned: Result as a label "can go wrong". S
September 6, 2026· ~6 min readModule 8 — Traits & Generics ## Generics: Types as Parameters One function for every type variant? `largest_i32`, `largest_char`, `largest_string` — three times the same code. *
September 6, 2026· ~6 min readModule 9 — Lifetimes ## References under control: longest The classic that doesn't compile — and makes you fully grasp the most important concept in Rust: ```rust fn lo
September 6, 2026· ~4 min readModule 10 — Closures & Iterators ## Closures: Functions with Memory Sometimes you need a small function in exactly one place — a comparison criterion, a bonus calculator, a callback