3 ms·
`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.
by pornel 8y ago
`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.