Crate range_map

source ·


When creating a RangeMap from a list of ranges and values, there’s a possiblity that two ranges will overlap. In this case, it’s a problem if they want to be associated to different values (because we don’t know which value should be assigned to the intersection of the ranges). An OverlapError is the result of such a situation. It contains two members. The first is a RangeMap obtained by simply ignoring all the ranges that would cause a bad overlap. The second is the collection of ranges that were ignored.
A range of elements, including the endpoints.
A set of characters. Optionally, each character in the set may be associated with some data.
A multi-valued mapping from primitive integers to other data.
A set of integers, implemented as a sorted list of (inclusive) ranges.