pub struct RangeSet<T>(/* private fields */);Implementations§
Source§impl<T> RangeSet<T>
impl<T> RangeSet<T>
pub const EMPTY: Self
pub const FULL: Self
pub const fn new(init: bool) -> Self
pub const fn empty() -> Self
pub const fn full() -> Self
pub fn all_ranges(&self) -> AllRanges<'_, T> ⓘ
pub fn ranges(&self) -> Ranges<'_, T> ⓘ
pub fn empty_ranges(&self) -> Ranges<'_, T> ⓘ
pub fn into_ranges(self) -> IntoRanges<T> ⓘ
pub fn into_empty_ranges(self) -> IntoRanges<T> ⓘ
Source§impl<T: Clone + Ord> RangeSet<T>
impl<T: Clone + Ord> RangeSet<T>
pub fn insert<B: PartitionBounds<T>>(&mut self, range: B)
pub fn remove<B: PartitionBounds<T>>(&mut self, range: B)
pub fn union(&mut self, other: &Self)
pub fn unioned(self, other: &Self) -> Self
pub fn intersect(&mut self, other: &Self)
pub fn intersected(self, other: &Self) -> Self
pub fn invert(&mut self)
pub fn inverted(self) -> Self
Methods from Deref<Target = PartitionMap<T, bool>>§
pub fn partitions(&self) -> Partitions<'_, K, V> ⓘ
pub fn keys(&self) -> Keys<'_, K, V> ⓘ
pub fn values(&self) -> Values<'_, K, V> ⓘ
pub fn sample<T: ?Sized + Ord>(&self, at: &T) -> &Vwhere
K: Borrow<T>,
pub fn set<B: PartitionBounds<K>>(&mut self, range: B, value: V)
pub fn update<B: PartitionBounds<K>, F: FnMut(Partition<&K>, &V) -> V>( &mut self, range: B, f: F, )
pub fn update_all<I: IntoIterator<Item: PartitionBounds<K>>, F: FnMut(Partition<&K>, &V) -> V>( &mut self, it: I, f: F, )
pub fn fold<F: FnMut((Partition<&K>, &V), &V) -> V>( &mut self, other: &PartitionMap<K, V>, f: F, )
Trait Implementations§
impl<T: Eq> Eq for RangeSet<T>
Source§impl<T: Clone + Ord, B: PartitionBounds<T>> Extend<B> for RangeSet<T>
impl<T: Clone + Ord, B: PartitionBounds<T>> Extend<B> for RangeSet<T>
Source§fn extend<I: IntoIterator<Item = B>>(&mut self, it: I)
fn extend<I: IntoIterator<Item = B>>(&mut self, it: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
🔬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<T: Clone + Ord, B: PartitionBounds<T>> FromIterator<B> for RangeSet<T>
impl<T: Clone + Ord, B: PartitionBounds<T>> FromIterator<B> for RangeSet<T>
Source§fn from_iter<I: IntoIterator<Item = B>>(it: I) -> Self
fn from_iter<I: IntoIterator<Item = B>>(it: I) -> Self
Creates a value from an iterator. Read more
Source§impl<T: Ord> Ord for RangeSet<T>
impl<T: Ord> Ord for RangeSet<T>
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for RangeSet<T>
impl<T: PartialOrd> PartialOrd for RangeSet<T>
impl<T: PartialEq> StructuralPartialEq for RangeSet<T>
Auto Trait Implementations§
impl<T> Freeze for RangeSet<T>
impl<T> RefUnwindSafe for RangeSet<T>
impl<T> Send for RangeSet<T>
impl<T> Sync for RangeSet<T>
impl<T> Unpin for RangeSet<T>
impl<T> UnsafeUnpin for RangeSet<T>
impl<T> UnwindSafe for RangeSet<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.