Union Types vs Either: What's the difference?
You may have stumbled on the Either type at some point if you used a functional programming language. Or perhaps the Result type in Rust. Their purpose it to explicitly embed the possibility of failure into a signature, while also treating errors as values (rather than raising exceptions). Union types