Module guides for the Rust standard library
Long-form, opinionated walkthroughs of every important module in std. Each guide explains what the module is for, the tradeoffs between its types, and the patterns experienced Rust developers actually use.
Six data structures cover almost every general-purpose container need in Rust. Pick the one whose performance shape matches your w
The Iterator trait is the single most important abstraction in std after ownership. Master it and most data-processing code become
Two traits, Read and Write, generalise every byte stream in the language. Everything else in io is built on top.
Synchronous, cross-platform access to the file system. For async file I/O reach for tokio::fs or async-fs.
Mutex, RwLock, Arc, OnceLock, channels, and atomics — everything you need for safe shared-state concurrency.
Native OS threads with safe joining, scoped lifetimes, and ergonomic builder configuration.
Option<T> is how Rust eliminates null-pointer crashes at compile time. Every absent value is explicit in the type system.
Result<T, E> is how Rust handles every kind of failure without exceptions, panics, or hidden control flow.
Display, Debug, and the underlying Formatter machinery — what every format string is built from.
The borrowed counterpart to String. Almost every text-processing function in Rust takes &str.
Add, Sub, Mul, Div, Index, Deref, Range — the traits that give built-in operators their meaning.
Take, swap, replace, drop, size_of, align_of — the surgical tools for working around the borrow checker safely.
When references and Box are not enough — usually for FFI, intrusive data structures, and lock-free algorithms.
Cell, RefCell, OnceCell — mutate a value through a shared (&) reference, with safety enforced at compile time or at runtime.
Read environment variables, command-line args, and the current working directory, and tell what platform you are running on.
Instant for elapsed-time measurement, Duration for spans, SystemTime for wall-clock — three types that cover almost every use case
Command, Child, Stdio, ExitStatus — everything you need to call out to other binaries.
Path and PathBuf are the borrowed/owned pair for filesystem paths — separator-aware, OS-aware, never wrong.
TcpStream, TcpListener, UdpSocket, plus the IpAddr family — enough for blocking network code and a foundation for async runtimes.
The standard interface every error type implements — source chains, downcasting, and idiomatic error reporting.
Send, Sync, Sized, Copy, Unpin — the marker traits the compiler reasons about implicitly.
NonZero* niche-optimised integers, ParseIntError, and the wrapping / saturating / checked arithmetic helpers.
PartialEq, Eq, PartialOrd, Ord — the four traits behind ==, !=, <, > and how they compose.
&[T] and &mut [T] are the foundation of low-overhead Rust — every Vec, every array, every byte buffer can be sliced.
Pin<P> guarantees the pointee will not move — the building block that makes self-referential async futures sound.
Future, Poll, Context, Waker — the four types the compiler's async desugaring is built on.
The minimal types every async runtime is built on. You will only see them when implementing a runtime or a custom Future.
panic!, catch_unwind, set_hook, take_hook — the levers that decide what happens when a panic fires.
The traits that govern type conversion. Implement From, get Into for free.
A single trait that gives every type a sensible "empty" or "zero" value. Derive it where it makes sense.