3 releases
new 0.1.3 | Oct 4, 2024 |
---|---|
0.1.2 | Sep 14, 2024 |
0.1.1 | Sep 2, 2024 |
0.1.0 |
|
#437 in Data structures
3,200 downloads per month
Used in 4 crates
(3 directly)
92KB
1.5K
SLoC
Among
The enum Among
with variants Left
, Middle
and Right
is a general purpose sum type with three cases.
English | 简体中文
Introduction
The enum Among
with variants Left
, Middle
and Right
and trait implementations.
Installation
-
Use with default feature
[dependencies] among = "0.1"
-
Use without
std
andalloc
[dependencies] among = { version = "0.1", default-features = false }
-
Enable
futures
feature to enable trait implementation includingfutures::io::AsyncRead
,futures::io::AsyncBufRead
,futures::io::AsyncWrite
, andfutures::io::AsyncSeek
.[dependencies] among = { version = "0.1", features = ["futures", "std"] }
-
Enable
tokio
feature to enable trait implementation includingtokio::io::AsyncRead
,tokio::io::AsyncBufRead
,tokio::io::AsyncWrite
andtokio::io::AsyncSeek
.[dependencies] among = { version = "0.1", features = ["tokio", "std"] }
Pedigree
This code is inspired and modified based on rayon-rs/either
.
License
among
is under the terms of both the MIT license and the
Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.
Copyright (c) 2024 Al Liu.
Dependencies
~0–6MB
~24K SLoC