#either #proc-macro #either-type #eithers

no-std elor

Base generic implementation of an Either type

6 stable releases

1.1.4 Jan 4, 2023
1.1.3 Oct 5, 2022
1.1.2 Jul 19, 2022
1.1.1 May 6, 2022
1.0.0 Apr 5, 2022

#594 in Rust patterns

Download history 8/week @ 2024-01-01 14/week @ 2024-01-08 20/week @ 2024-02-12 11/week @ 2024-02-19 43/week @ 2024-02-26 17/week @ 2024-03-04 17/week @ 2024-03-11 18/week @ 2024-03-18 30/week @ 2024-03-25

85 downloads per month
Used in 4 crates

MIT license

63KB
1.5K SLoC

Either Left Or Right (elor)

Crate API

elor is a no_std Rust crate with one simple type; Either. It represents a value that's of one type or another, and implements various functionalities depending on the attributes of those types

Features

Name Description Dependencies
std Allows the usage of standard library functionality. Enabled by default and mutually exclusive with alloc Standard library
alloc Allows for heap allocation in the absence of the standard library. Mutually exclusive with std Alloc library
serialize Allow for serialization and deserialization serde
random Allows generating random Either's rand
async Allows async polling of async Either's futures
macro Allows for the implementation of functionality geared towards the development of procedural macros quote, syn and proc_macro2

Dependencies

~0.4–1.1MB
~23K SLoC