There are some crates that add a derive for errors, but most people tend to use error-chain or quick-error. Both give you the boilerplate pretty much for free, with various other advantages. E.g., using error-chain, you can just write the above code as
error_chain! {
foreign_links {
Io(io::Error);
Parse(ParseIntError);
}
}
and it'll even generate an aliased `Result` type as well as fancy chaining support.