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
[] = "0.1" -
Use without
stdandalloc[] = { = "0.1", = false } -
Enable
futuresfeature to enable trait implementation includingfutures::io::AsyncRead,futures::io::AsyncBufRead,futures::io::AsyncWrite, andfutures::io::AsyncSeek.[] = { = "0.1", = ["futures", "std"] } -
Enable
tokiofeature to enable trait implementation includingtokio::io::AsyncRead,tokio::io::AsyncBufRead,tokio::io::AsyncWriteandtokio::io::AsyncSeek.[] = { = "0.1", = ["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.