https://github.com/aandreba/elor
A generic Either type implementation for Rust
https://github.com/aandreba/elor
Last synced: about 1 year ago
JSON representation
A generic Either type implementation for Rust
- Host: GitHub
- URL: https://github.com/aandreba/elor
- Owner: Aandreba
- Created: 2022-03-04T12:00:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T19:36:11.000Z (over 3 years ago)
- Last Synced: 2024-08-10T03:15:55.785Z (almost 2 years ago)
- Language: Rust
- Homepage:
- Size: 25.4 KB
- Stars: 13
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Either Left Or Right (elor)
[](https://crates.io/crates/elor)
[](https://docs.rs/elor)
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](https://github.com/rust-lang/rust/tree/master/library/std) |
| ```alloc``` | Allows for heap allocation in the absence of the standard library. Mutually exclusive with ```std``` | [Alloc library](https://github.com/rust-lang/rust/tree/master/library/alloc) |
| ```serialize``` | Allow for serialization and deserialization | [serde](https://github.com/serde-rs/serde) |
| ```random``` | Allows generating random ```Either```'s | [rand](https://github.com/rust-random/rand) |
| ```async``` | Allows async polling of async ```Either```'s | [futures](https://github.com/rust-lang/futures-rs) |
| ```macro``` | Allows for the implementation of functionality geared towards the development of procedural macros | [quote](https://github.com/dtolnay/quote), [syn](https://github.com/dtolnay/syn) and [proc_macro2](https://github.com/dtolnay/proc-macro2) |