Crates.io | few |
lib.rs | few |
version | 0.1.5 |
source | src |
created_at | 2020-07-01 19:03:19.993146 |
updated_at | 2021-01-04 03:56:48.443259 |
description | A generalization of `std::Option` allowing for up to two optional values |
homepage | https://github.com/skysch/few-rs |
repository | https://github.com/skysch/few-rs |
max_upload_size | |
id | 260363 |
size | 23,824 |
std::Option
allowing for up to two optional values.This library provides a Few
enum with three variants:
pub enum Few<T> {
Zero,
One(T),
Two(T, T),
}
Very few methods are defined for it, and for most purposes, std::Option
, std::Vec
, or smallvec
should be used instead. This library was developed to provide a data structure for pattern matching on the result of set-like intersect
, union
, and minus
operations over contiguous ranges.
Few is licenced with the MIT license or the Apache version 2.0 license, at your option.