Sunbeam Studios

Our open-source projects, here for you!

either (1.15.0)

Published 2026-03-26 10:57:36 +00:00 by siennathesane

Installation

[registry]
default = "gitea"

[registries.gitea]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add either@1.15.0

About this package

The enum `Either` with variants `Left` and `Right` is a general purpose sum type with two cases.

The enum Either with variants Left and Right is a general purpose sum type with two cases.

Either has methods that are similar to Option and Result, and it also implements traits like Iterator.

Includes macros try_left!() and try_right!() to use for short-circuiting logic, similar to how the ? operator is used with Result. Note that Either is general purpose. For describing success or error, use the regular Result.

Dependencies

ID Version
serde ^1.0.95
serde_json ^1.0.0

Keywords

data-structure no_std
Details
Cargo
2026-03-26 10:57:36 +00:00
0
bluss
MIT OR Apache-2.0
19 KiB
Assets (1)
Versions (1) View all
1.15.0 2026-03-26