Glossary coding Term Page
Result
A Rust enum that models success and failure as explicit values
Core Idea
Result is Rust's standard enum for representing success as Ok(T) and failure as Err(E). Because the error path stays visible in the type system, callers must handle failure deliberately instead of ignoring it.
Why It Matters Here
Mathbong uses Result for file reads, JSON parsing, async functions, and match-based error handling. It is one of the clearest expressions of Rust's idea that recoverable failure should be treated as data.