pub struct RangeMap<K, V, C: Storage<Item<AnyRange<K>, V>>> { /* private fields */ }Expand description
Range map.
Implementations§
Source§impl<K, V, C: Storage<Item<AnyRange<K>, V>>> RangeMap<K, V, C>
impl<K, V, C: Storage<Item<AnyRange<K>, V>>> RangeMap<K, V, C>
pub fn len(&self) -> K::Len
pub fn bounded_len(&self) -> Option<K::Len>where
K: Measure + PartialEnum,
pub fn is_empty(&self) -> boolwhere
K: Measure + PartialEnum,
pub fn range_count(&self) -> usize
pub fn intersects<R: AsRange<Item = K>>(&self, key: R) -> bool
pub fn contains_key(&self, key: K) -> bool
pub fn get(&self, key: K) -> Option<&V>
pub fn iter(&self) -> Iter<'_, K, V, C> ⓘ
Source§impl<K, V, C: Storage<Item<AnyRange<K>, V>>> RangeMap<K, V, C>
impl<K, V, C: Storage<Item<AnyRange<K>, V>>> RangeMap<K, V, C>
pub fn update<R: AsRange<Item = K>, F>(&mut self, key: R, f: F)
pub fn insert_disconnected<R: IntoRange<Item = K>>(
&mut self,
key: R,
value: V,
) -> Result<(), (AnyRange<K>, V)>where
K: PartialEnum + Measure,
Trait Implementations§
impl<K, V, C: Storage<Item<AnyRange<K>, V>>> Eq for RangeMap<K, V, C>
Source§impl<K, V, C: Storage<Item<AnyRange<K>, V>>> Ord for RangeMap<K, V, C>
impl<K, V, C: Storage<Item<AnyRange<K>, V>>> Ord for RangeMap<K, V, 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, V, C, D> PartialEq<RangeMap<K, V, D>> for RangeMap<K, V, C>where
K: Measure + PartialOrd + PartialEnum,
V: PartialEq,
C: Storage<Item<AnyRange<K>, V>>,
D: Storage<Item<AnyRange<K>, V>>,
impl<K, V, C, D> PartialEq<RangeMap<K, V, D>> for RangeMap<K, V, C>where
K: Measure + PartialOrd + PartialEnum,
V: PartialEq,
C: Storage<Item<AnyRange<K>, V>>,
D: Storage<Item<AnyRange<K>, V>>,
Source§impl<K, V, C, D> PartialOrd<RangeMap<K, V, D>> for RangeMap<K, V, C>where
K: Measure + PartialOrd + PartialEnum,
V: PartialOrd,
C: Storage<Item<AnyRange<K>, V>>,
D: Storage<Item<AnyRange<K>, V>>,
impl<K, V, C, D> PartialOrd<RangeMap<K, V, D>> for RangeMap<K, V, C>where
K: Measure + PartialOrd + PartialEnum,
V: PartialOrd,
C: Storage<Item<AnyRange<K>, V>>,
D: Storage<Item<AnyRange<K>, V>>,
Auto Trait Implementations§
impl<K, V, C> Freeze for RangeMap<K, V, C>
impl<K, V, C> RefUnwindSafe for RangeMap<K, V, C>where
C: RefUnwindSafe,
<C as Storage<Item<AnyRange<K>, V>>>::Node: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, V, C> Send for RangeMap<K, V, C>
impl<K, V, C> Sync for RangeMap<K, V, C>
impl<K, V, C> Unpin for RangeMap<K, V, C>
impl<K, V, C> UnsafeUnpin for RangeMap<K, V, C>
impl<K, V, C> UnwindSafe for RangeMap<K, V, C>where
C: UnwindSafe,
<C as Storage<Item<AnyRange<K>, V>>>::Node: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
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