- Layout and Representation in Rust
See what a struct or enum costs in bytes, why the compiler reorders fields, and which layout promises Rust actually guarantees.
- When a Simpler Type Is Better
Price the type tools before using them: what each wrapper catches, what it costs, and the criteria for stopping.
- Evolving Public APIs in Rust
Decide what downstream code may construct, match, and implement, and pick the tool that keeps each surface open for change.
- Runtime States and Typestate in Rust
Decide where a lifecycle's states belong: in the value as an enum, or in the type as a typestate parameter.
- Combinators and Ownership in Rust
Use Option and Result methods without moving borrowed data or adding unnecessary clones.
- Option vs. Result in Rust
Choose between absence and failure, then connect Option and Result without losing information.
- Boundary Parsing in Rust
Turn untrusted text and bytes into validated Rust values at one clear boundary.
- Smart Constructors in Rust
Use private representations and checked construction to keep domain invariants in one place.
- Modeling Data with Rust's Type System
A practical guide to structs, enums, newtypes, validated input, Option, Result, and typestate in modern Rust.