typeover
rust curriculum

Curriculum Data modeling

module 3 of 7

Data modeling

The Rust way to model domain data: structs with impl blocks, enums as tagged unions, pattern matching, Option, and destructuring. This is where TypeScript object and union habits become Rust algebraic data types.

Themes

Rust separates data declarations from method implementations. A struct names fields; an impl block attaches constructors and methods. Planned exercises: 1. choose struct declar…

9 ready

begin →

Rust enums are real sum types: each variant can carry different data. This is the closest Rust analogue to TypeScript discriminated unions, but the compiler enforces exhaustiveness…

9 ready

begin →

match is not a switch statement with nicer syntax. It destructures, binds names, checks exhaustiveness, and returns values. Planned exercises: 1. choose exhaustive match. 2. re…

9 ready

begin →

Rust does not have null; absence is Option<T>. TypeScript users already know T | null; Rust makes the check mandatory before access. Planned exercises: 1. choose Option<T>.…

9 ready

begin →