Skip to main content
  1. 🏷️ Tags/

Error-Handling

2026

Rust basics: Option and Result

·481 words·3 mins
Rust does not use null for ordinary absence, and it does not rely on exceptions for recoverable errors. Instead, it uses enums: Option<T> and Result<T, E>. These two types show up everywhere. If you understand them early, a lot of Rust APIs stop looking strange.