pub struct RangeMap<K, V>(/* private fields */);Implementations§
Methods from Deref<Target = PartitionMap<K, Option<V>>>§
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<K: Eq, V: Eq> Eq for RangeMap<K, V>
Source§impl<K: Clone + Ord, V: Clone + PartialEq, B: PartitionBounds<K>> Extend<(B, V)> for RangeMap<K, V>
impl<K: Clone + Ord, V: Clone + PartialEq, B: PartitionBounds<K>> Extend<(B, V)> for RangeMap<K, V>
Source§fn extend<I: IntoIterator<Item = (B, V)>>(&mut self, it: I)
fn extend<I: IntoIterator<Item = (B, V)>>(&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<K: Clone + Ord, V: Clone + PartialEq, B: PartitionBounds<K>> FromIterator<(B, V)> for RangeMap<K, V>
impl<K: Clone + Ord, V: Clone + PartialEq, B: PartitionBounds<K>> FromIterator<(B, V)> for RangeMap<K, V>
Source§impl<K: Ord, V: Ord> Ord for RangeMap<K, V>
impl<K: Ord, V: Ord> Ord for RangeMap<K, V>
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<K: PartialOrd, V: PartialOrd> PartialOrd for RangeMap<K, V>
impl<K: PartialOrd, V: PartialOrd> PartialOrd for RangeMap<K, V>
impl<K: PartialEq, V: PartialEq> StructuralPartialEq for RangeMap<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for RangeMap<K, V>
impl<K, V> RefUnwindSafe for RangeMap<K, V>
impl<K, V> Send for RangeMap<K, V>
impl<K, V> Sync for RangeMap<K, V>
impl<K, V> Unpin for RangeMap<K, V>
impl<K, V> UnsafeUnpin for RangeMap<K, V>
impl<K, V> UnwindSafe for RangeMap<K, V>
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.