# either (Rust)

> Rust's general-purpose Either sum type with Left and Right

Source: https://talira.ai/catalog/either-rust-c8r94z53
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / functional programming](https://talira.ai/categories/libraries/functional-programming), [languages / rust](https://talira.ai/categories/languages/rust)
- Licence: MIT OR Apache-2.0[^1][^2][^3]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT or Apache-2.0).
- Free tier: yes[^1]
- Backed by: [rayon-rs](https://talira.ai/orgs/rayon-rs.md)

either is a Rust crate with the enum Either, a general-purpose sum type with two cases, Left and Right. It has methods like Option's and Result's, implements traits such as Iterator, Read and Write, and includes try_left! and try_right! macros for short-circuiting like the ? operator. It works without the standard library when its default std feature is turned off. Its README says to use Result instead when the two sides mean success and error. Install it from crates.io as either.

## Links

- GitHub: https://github.com/rayon-rs/either
- Docs: https://docs.rs/either/

## Problems it solves

- return one of two different iterator types from a Rust function
- hold a value that can be one of two types in Rust without writing my own enum
- short-circuit on the left or right side of a two-way value in Rust

## Features

- Either enum with Left and Right
- Option- and Result-like methods
- Iterator, Read and Write implementations
- try_left! and try_right! macros
- no_std support

## Trust

Overall: 0.41 out of 1.
Signals: maintenance 0.49, adoption 0.55, momentum 0.22, community 0.67, backing 0.30, extensibility 0.00.

- last commit 54 days ago
- 6 commits in the last 90 days
- 565 GitHub stars
- 45 contributors
- backed by rayon-rs

## Sources

[^1]: https://github.com/rayon-rs/either (checked 28 Nov 2026)
[^2]: https://github.com/rayon-rs/either/blob/main/LICENSE-MIT (checked 28 Nov 2026)
[^3]: https://github.com/rayon-rs/either/blob/main/LICENSE-APACHE (checked 28 Nov 2026)
