Re:Rust 2019: Tame Complexity through Community Involvement ...
by pornel on Tuesday January 01, 2019 @07:55PM
(#18803434)
`Throwable` in Rust is `dyn std::error::Error`.
If you make your functions return `Box<dyn Error>` (or `failure::Error`), they will all convert out of the box. The `?` operator performs conversion itself. For chains `.map_err(From::from)` does it.
If you make your functions return `Box<dyn Error>` (or `failure::Error`), they will all convert out of the box. The `?` operator performs conversion itself. For chains `.map_err(From::from)` does it.