Rust's error handling primarily rests on two enums: Option and Result. Nearly all library code that could fail returns values wrapped inside one of those two or a variation of them.
Option replaces the Null type of other languages; it models things that are either something (Some(N)) or may be nothing (None). For instance, a query against a database might return an Option, since the result set of the query might be empty. Neither of these actions need to be considered an error.
The Result type models operations that may succeed (Ok(T)) or may fail (Err(E)). In case of an error, some form of reporting of the error is returned wrapped inside the Err.
To make operating with these types a bit easier, there are helpful ...