Rust theorytheory 0/50 · 0%
Error handling · easy

15. Result<T, E>

Recoverable errors as values.

`Result` is `Ok(T)` or `Err(E)`. The `?` operator returns early on Err, converting the error via the From trait. Because results are values, error paths are visible in signatures rather than hidden in exceptions.

Check your understanding

  1. 1. What does `?` do on an Err?

  2. 2. Which trait powers `?` error conversion?