Hacker News new | ask | show | jobs
by dbaupp 3454 days ago
Result is exactly Haskell's Either, just with a different name.

> I had assumed that Rust would give me the same

They do. ADTs in Rust are very similar to languages like Haskell. The only major difference I can think of is everything is stored inline in the enums in Rust (they're what one might call "value types" in some languages) without any allocations required.