pub struct RangeMap<V> { /* private fields */ }Expand description
Ordered map of non-overlapping ranges.
Implementations§
Source§impl<V: Clone> RangeMap<V>
impl<V: Clone> RangeMap<V>
pub fn new() -> Self
pub fn insert(&mut self, lo: f32, hi: f32, value: V) -> bool
pub fn query(&self, point: f32) -> Option<&V>
pub fn remove_containing(&mut self, point: f32) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn overlaps(&self, lo: f32, hi: f32) -> Vec<&RangeEntry<V>>
pub fn total_coverage(&self) -> f32
pub fn ranges(&self) -> Vec<(f32, f32)>
pub fn contains_point(&self, point: f32) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for RangeMap<V>
impl<V> RefUnwindSafe for RangeMap<V>where
V: RefUnwindSafe,
impl<V> Send for RangeMap<V>where
V: Send,
impl<V> Sync for RangeMap<V>where
V: Sync,
impl<V> Unpin for RangeMap<V>where
V: Unpin,
impl<V> UnsafeUnpin for RangeMap<V>
impl<V> UnwindSafe for RangeMap<V>where
V: 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