#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

#850 in Rust patterns

Download history 13/week @ 2024-06-10 8/week @ 2024-06-17 18/week @ 2024-06-24 33/week @ 2024-07-01 12/week @ 2024-07-15 40/week @ 2024-07-29 21/week @ 2024-08-05 7/week @ 2024-08-12 7/week @ 2024-08-19 23/week @ 2024-08-26 4/week @ 2024-09-02 9/week @ 2024-09-09 19/week @ 2024-09-16 35/week @ 2024-09-23

74 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.3–1MB
~21K SLoC