Get the latest tech news
Error handling in Rust
A blog, mostly about programming
If you match on this error enum, you will have to manually distinguish which of those variants are not applicable in your current scope, based on the documentation of the function (and who reads that anyway? Defining an extra error enum for every function and all the conversions between them is extremely tedious. It allows you to define error enums for different functions in a very concise way and automatically generates the trait implementations for conversions between those.
Or read this on Hacker News