typeover
rust curriculum

Curriculum Errors, crates & tests

module 5 of 7

Errors, crates & tests

The everyday shape of real Rust programs: Result, ?, custom error enums, module boundaries, Cargo packages, visibility, and tests. The learner moves from snippets to small crates.

Themes

Recoverable errors are values: Result<T, E>. The ? operator either unwraps Ok(T) or returns the Err(E) early from the current function. Planned exercises: 1. choose `Result…

9 ready

begin →

Small Rust programs often use an enum for domain errors. This theme teaches error variants, carrying context, Display, and using From so ? can convert lower-level errors. Pla…

9 ready

begin →

Rust modules are not files by accident; they are the visibility and namespace system. This theme covers mod, use, pub, pub(crate), and paths with crate:: and super::. P…

9 ready

begin →

Cargo is Rust's build tool, package manager, test runner, and project skeleton. This theme teaches Cargo.toml, crates, binaries vs libraries, unit tests, integration tests, and `…

9 ready

begin →