Crate few

Source
Expand description

A generalization of 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.

§Features

FeatureDescription
“serde”Enables serialization and deserialization of data using serde.

By default, there are no features enabled.

Enums§

  • A type which may contain zero, one, or two of a value.