pub struct RangeSet<T, C: Storage<Item<AnyRange<T>, ()>>> { /* private fields */ }Expand description
Range set.
This is based on a range map, where the values are ().
Implementations§
Source§impl<T, C: Storage<Item<AnyRange<T>, ()>>> RangeSet<T, C>
impl<T, C: Storage<Item<AnyRange<T>, ()>>> RangeSet<T, C>
pub fn range_count(&self) -> usize
pub fn len(&self) -> T::Len
pub fn bounded_len(&self) -> Option<T::Len>where
T: Measure + PartialEnum,
pub fn is_empty(&self) -> boolwhere
T: Measure + PartialEnum,
pub fn intersects<R: AsRange<Item = T>>(&self, values: R) -> bool
pub fn contains(&self, value: T) -> bool
pub fn iter(&self) -> Iter<'_, T, C> ⓘ
Trait Implementations§
impl<K, C: Storage<Item<AnyRange<K>, ()>>> Eq for RangeSet<K, C>
Source§impl<R: IntoRange, C: Storage<Item<AnyRange<R::Item>, ()>>> Extend<R> for RangeSet<R::Item, C>
impl<R: IntoRange, C: Storage<Item<AnyRange<R::Item>, ()>>> Extend<R> for RangeSet<R::Item, C>
Source§fn extend<I: IntoIterator<Item = R>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = R>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<R: IntoRange, C: Storage<Item<AnyRange<R::Item>, ()>>> FromIterator<R> for RangeSet<R::Item, C>
impl<R: IntoRange, C: Storage<Item<AnyRange<R::Item>, ()>>> FromIterator<R> for RangeSet<R::Item, C>
Source§fn from_iter<I: IntoIterator<Item = R>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = R>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<K, C: Storage<Item<AnyRange<K>, ()>>> Hash for RangeSet<K, C>where
K: Hash + PartialEnum,
impl<K, C: Storage<Item<AnyRange<K>, ()>>> Hash for RangeSet<K, C>where
K: Hash + PartialEnum,
Source§impl<K, C: Storage<Item<AnyRange<K>, ()>>> Ord for RangeSet<K, C>
impl<K, C: Storage<Item<AnyRange<K>, ()>>> Ord for RangeSet<K, C>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<K, C, D> PartialOrd<RangeSet<K, D>> for RangeSet<K, C>
impl<K, C, D> PartialOrd<RangeSet<K, D>> for RangeSet<K, C>
Auto Trait Implementations§
impl<T, C> Freeze for RangeSet<T, C>
impl<T, C> RefUnwindSafe for RangeSet<T, C>where
C: RefUnwindSafe,
<C as Storage<Item<AnyRange<T>, ()>>>::Node: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, C> Send for RangeSet<T, C>
impl<T, C> Sync for RangeSet<T, C>
impl<T, C> Unpin for RangeSet<T, C>
impl<T, C> UnsafeUnpin for RangeSet<T, C>
impl<T, C> UnwindSafe for RangeSet<T, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more