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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.