Error handling in Rust is a bit of an intermediate topic. That is in part because error handling in any language is actually more complicated than it seems, partly because it is a still-evolving part of the language and std libs (and therefore a lot of stuff is in crates, which are also evolving), and partly because there is no standard (de facto or de jure) way to do it. Unfortunately, there is no good guide to error handling which gets into both the details of the support in the language/libs and the design issues (though there are a bunch of great blog posts and other resources scattered around).
I set out to remedy the lack of docs by writing a comprehensive guide. This turned out to be hard work and revealed how many pieces of the puzzle I don't know as well as I thought I did. It also hasn't been a top priority at work, so it has taken ages. Anyway, I have finally finished a first draft and I am pretty happy with it:
Give it a read and let me know what you think!
For future work, it needs a bunch of polishing and I've already got a bunch of feedback to address. I want to add some case studies which I think would be really useful to see some of the ideas in practice. I also think the section on errros and FFI/interop is a bit weak and could be improved. If there's anything you'd like to add, let me know in an issue or send a PR.