Here's what you should remember from this chapter:
- Error handling in Rust is explicit: operations that could fail have a two-part return value via the Result or Option generic types
- You must handle errors in some way, either by deconstructing the Result/Option values by a match statement, or by using the helper methods or macros
- You should usually opt for handling errors properly, that is, not resorting to operations that panic on failures
- Use the unwrapping methods or panicking when errors would be programming errors or so fatal that recovery would be impossible
- Panics are mostly non-recoverable, which means that they crash your thread
- Use the standard Error trait for your own error types
The next chapter will be about Rust's somewhat ...