23
Designing error types in Rust
(mmapped.blog)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
One problem is that Rust doesn't support tagged unions.
enum
is regrettably solving a different problem, but since it's the only hammer we have, it's abused for this kind of thing. This often leads to having to writematch error ... unreachable
.