7 releases
0.1.7 | Oct 14, 2024 |
---|---|
0.1.6 | Oct 8, 2024 |
0.1.2 | Sep 14, 2024 |
#388 in Data structures
2,033 downloads per month
Used in 6 crates
(4 directly)
100KB
2K
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
~23K SLoC