Struct btree_range_map::AnyRange
source · [−]Fields
start: Bound<T>end: Bound<T>Implementations
sourceimpl<T> AnyRange<T>
impl<T> AnyRange<T>
pub fn from<R: AsRange<Item = T>>(range: R) -> AnyRange<T> where
T: Clone,
pub fn into_bounds(self) -> (Bound<T>, Bound<T>)
pub fn is_empty(&self) -> bool where
T: PartialOrd + Measure,
pub fn len(&self) -> T::Len where
T: Measure,
pub fn pick(&self) -> Option<T> where
T: PartialOrd + Clone + Measure,
sourcepub fn first(&self) -> Option<T> where
T: PartialOrd + Clone + Measure,
pub fn first(&self) -> Option<T> where
T: PartialOrd + Clone + Measure,
Get the first element of the range if there is one.
sourcepub fn last(&self) -> Option<T> where
T: PartialOrd + Clone + Measure,
pub fn last(&self) -> Option<T> where
T: PartialOrd + Clone + Measure,
Get the last element of the range if there is one.
pub fn add<S>(&mut self, other: &S) where
T: Clone + Measure + PartialOrd,
S: RangeBounds<T>,
pub fn intersects<S>(&self, other: &S) -> bool where
T: Measure + PartialOrd,
S: RangeBounds<T>,
pub fn pick_in_intersection<S>(&self, other: &S) -> Option<T> where
T: Measure + Clone + PartialOrd,
S: AsRange + RangeBounds<T>,
sourceimpl<'a, T> AnyRange<&'a T>
impl<'a, T> AnyRange<&'a T>
pub fn ref_is_empty(&self) -> bool where
T: PartialOrd + Measure,
Trait Implementations
sourceimpl<T: Measure + PartialOrd> AsRange for AnyRange<T>
impl<T: Measure + PartialOrd> AsRange for AnyRange<T>
type Item = T
type Item = T
Type of the elements of the range.
fn is_empty(&self) -> bool
fn intersects<R: AsRange>(&self, other: &R) -> bool where
Self::Item: PartialOrd<R::Item> + Measure<R::Item>,
fn connected_to<R: AsRange>(&self, other: &R) -> bool where
Self::Item: PartialOrd<R::Item> + Measure<R::Item>,
fn intersected_with<'a, R: AsRange<Item = Self::Item>>(
&'a self,
other: &'a R
) -> AnyRange<&'a Self::Item> where
Self::Item: PartialOrd + Measure,
fn without<'a, R: AsRange<Item = Self::Item>>(
&'a self,
other: &'a R
) -> Difference<&'a Self::Item> where
Self::Item: PartialOrd + Measure,
fn product<'a, R: AsRange<Item = Self::Item>>(
&'a self,
other: &'a R
) -> Product<&'a Self::Item> where
Self::Item: PartialOrd + Measure,
sourceimpl<T> Hash for AnyRange<T> where
T: Hash + PartialEnum,
impl<T> Hash for AnyRange<T> where
T: Hash + PartialEnum,
sourceimpl<T> Ord for AnyRange<T> where
T: Measure + Ord,
impl<T> Ord for AnyRange<T> where
T: Measure + Ord,
sourceimpl<T, U> PartialOrd<AnyRange<U>> for AnyRange<T> where
T: Measure<U> + PartialOrd<U>,
impl<T, U> PartialOrd<AnyRange<U>> for AnyRange<T> where
T: Measure<U> + PartialOrd<U>,
sourcefn partial_cmp(&self, other: &AnyRange<U>) -> Option<Ordering>
fn partial_cmp(&self, other: &AnyRange<U>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl<T> RangeBounds<T> for AnyRange<T>
impl<T> RangeBounds<T> for AnyRange<T>
impl<T: Copy> Copy for AnyRange<T>
impl<T> Eq for AnyRange<T> where
T: Measure + Ord,
Auto Trait Implementations
impl<T> RefUnwindSafe for AnyRange<T> where
T: RefUnwindSafe,
impl<T> Send for AnyRange<T> where
T: Send,
impl<T> Sync for AnyRange<T> where
T: Sync,
impl<T> Unpin for AnyRange<T> where
T: Unpin,
impl<T> UnwindSafe for AnyRange<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more