Skip to main content

One doc tagged with "result"

View all tags

The `Result` Enum and Error Handling

In the previous article, we learned how the Option enum is used to handle values that might be absent. Now, we'll look at another crucial enum from the standard library: Result. The Result enum is the primary way that Rust handles operations that can fail, such as reading a file or parsing a string.