Crate either

source ยท
Expand description

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

Crate features:

  • "use_std" Enabled by default. Disable to make the library #![no_std].

  • "serde" Disabled by default. Enable to #[derive(Serialize, Deserialize)] for Either

Re-exportsยง

  • pub use crate::Either::Left;
  • pub use crate::Either::Right;

Modulesยง

  • into_either ๐Ÿ”’
    The trait IntoEither provides methods for converting a type Self, whose size is constant and known at compile-time, into an Either variant.
  • iterator ๐Ÿ”’

Macrosยง

Structsยง

  • Iterator that maps left or right iterators to corresponding Either-wrapped items.

Enumsยง

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

Traitsยง

Functionsยง