Struct range_map::RangeSet [] [src]

pub struct RangeSet<T> { /* fields omitted */ }

A set of integers, implemented as a sorted list of (inclusive) ranges.


impl<T: Debug + PrimInt> RangeSet<T>

Creates a new empty RangeSet.

Tests if this set is empty.

Tests whether this set contains every valid value of T.

Returns the number of ranges used to represent this set.

Returns the number of elements in the set.

This saturates at usize::MAX.

Returns an iterator over all ranges in this set.

Returns an iterator over all elements in this set.

Checks if this set contains a value.

Returns the union between self and other.

Creates a set that contains every value of T.

Creates a set containing a single element.

Creates a set containing all elements except the given ones.


  • if chars is not sorted or not unique.

Finds the intersection between this set and other.

Returns the set of all characters that are not in this set.

Trait Implementations

impl<T: Clone> Clone for RangeSet<T>

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Eq> Eq for RangeSet<T>

impl<T: Hash> Hash for RangeSet<T>

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: PartialEq> PartialEq for RangeSet<T>

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Debug + PrimInt> Debug for RangeSet<T>

Formats the value using the given formatter.

impl<T: Debug + PrimInt> FromIterator<Range<T>> for RangeSet<T>

Builds a RangeSet from an iterator over Ranges.