Crate range_set

source ·
Expand description

RangeSet container type.

RangeSet stores collections of PrimInt values as inclusive ranges using generic SmallVec-backed storage. This means that a certain amount of ranges will fit on the stack before spilling over to the heap.

Re-exports

Modules

Macros

  • Convenient macro to construct RangeSets without needing bulky notation like ::<[RangeInclusive<_>; _]>. The macro allows a mix of numbers and inclusive ranges, with an optional length at the end for the smallvec array size. If the length is not specified, it will default to 4.

Structs

  • Iterates over elements of the RangeSet
  • A set of primitive integers represented as a sorted list of disjoint, inclusive ranges.

Constants

Functions

  • Report some sizes of various range set types
  • Tests a slice of ranges for validity as a range set: the element ranges must be properly disjoint (not adjacent) and sorted.