Trait tor_basic_utils::rangebounds::RangeBoundsExt
source · pub trait RangeBoundsExt<T>: RangeBounds<T> {
// Required method
fn intersect<'a, U: RangeBounds<T>>(
&'a self,
other: &'a U
) -> Option<(Bound<&'a T>, Bound<&'a T>)>;
}
Expand description
An extension trait for RangeBounds
.
Required Methods§
sourcefn intersect<'a, U: RangeBounds<T>>(
&'a self,
other: &'a U
) -> Option<(Bound<&'a T>, Bound<&'a T>)>
fn intersect<'a, U: RangeBounds<T>>( &'a self, other: &'a U ) -> Option<(Bound<&'a T>, Bound<&'a T>)>
Compute the intersection of two RangeBound
s.
In essence, this computes the intersection of the intervals described by bounds of the two objects.
Returns None
if the intersection of the two ranges is the empty set.