]>
Commit | Line | Data |
---|---|---|
abe05a73 XL |
1 | The enum `Either` with variants `Left` and `Right` is a general purpose |
2 | sum type with two cases. | |
3 | ||
4 | Either has methods that are similar to Option and Result, and it also implements | |
5 | traits like `Iterator`. | |
6 | ||
7 | Includes macros `try_left!()` and `try_right!()` to use for | |
8 | short-circuiting logic, similar to how the `?` operator is used with `Result`. | |
9 | Note that `Either` is general purpose. For describing success or error, use the | |
10 | regular `Result`. |