]> git.proxmox.com Git - rustc.git/blame - src/vendor/either/README-crates.io.md
New upstream version 1.31.0+dfsg1
[rustc.git] / src / vendor / either / README-crates.io.md
CommitLineData
abe05a73
XL
1The enum `Either` with variants `Left` and `Right` is a general purpose
2sum type with two cases.
3
4Either has methods that are similar to Option and Result, and it also implements
5traits like `Iterator`.
6
7Includes macros `try_left!()` and `try_right!()` to use for
8short-circuiting logic, similar to how the `?` operator is used with `Result`.
9Note that `Either` is general purpose. For describing success or error, use the
10regular `Result`.