Crate ranges

source ·
Expand description

§Ranges

This crate provides a generic alternative to core/std ranges, set-operations to work with them and a range set that can efficiently store them with the least amount of memory possible.

§Features

  • From implementations for all core/std ranges
  • open ranges like (3, 10]
  • support for RangeBounds<T>
  • iterators (even for unbound ranges when the domain has a minimum)
  • Display implementations for single and set ranges (with format argument pass-through)
  • Operators like | and ^ for their respective operation
  • Domain implementations for types like bool and char

Structs§

  • A stateful Iterator over a GenericRange<T>, yielding T.
  • A generic analog to core/std ranges.
  • A range set storing GenericRanges in the most memory-optimal fashion possible.

Enums§

  • This enum represents all possible arrangements of two GenericRanges.
  • Result of a unary or binary operation.
  • This enum represents all possible arrangements of two GenericRanges. The original values were moved, possibly modified, and then stored.

Traits§

  • Provides otherwise unknown information about the type it is being implemented for.
  • Domain-driven trait required to implement iterators on discrete types.