Appendix C — Glossary
- Borrow: a reference (
&T or &mut T) that uses a value without owning it.
- Borrow checker: the compiler pass that enforces shared XOR mutable and
"no reference outlives its owner", running on MIR.
- Crate: a compilation unit (library or binary). Package: a
Cargo.toml with one or more crates.
- Drop: the destructor. It runs when the owner goes out of scope.
- Fat pointer: a two-word pointer: slice (ptr + len) or trait object
(ptr + vtable).
- Future: a value that produces a result when polled to completion.
Lazy until polled.
- Interior mutability: mutation through
&T, made safe by runtime
checks or atomics (Cell, RefCell, Mutex, atomics).
- Lifetime: a compile-time name for the region where a borrow must be
valid.
- Monomorphization: compiling a generic function once per concrete type.
- Move: transferring ownership. A bitwise copy, after which the source
can no longer be used.
- Niche: an invalid bit pattern of a type that an enum uses as its tag,
for example
None in Option<&T>.
- Orphan rule: you can implement a trait for a type only if your crate
defines the trait or the type.
Pin: a guarantee that a value will not move in memory again; needed
for self-referential futures.
Send / Sync: auto traits for "can be moved to another thread" and
"can be shared between threads by reference".
- Typestate: encoding an object's state in its type, so invalid
operations do not compile.
- UB (undefined behavior): what happens if
unsafe code breaks the
rules. The compiler may assume it never happens.
- Zero-cost abstraction: an abstraction that compiles to the same code
you would write by hand.
Generated from real-life-rust-guide.md · 8 Oct 2026 16:36