Trait IntoBounds
pub trait IntoBounds<T>: ~const RangeBounds<T>
Used to convert a range into start and end bounds, consuming the range by value.
IntoBounds is implemented by Rust’s built-in range types, produced
by range syntax like .., a.., ..b, ..=c, d..e, or f..=g.
Required Methods
fn into_bounds(self) -> (Bound<T>, Bound<T>)Convert this range into the start and end bounds. Returns
(start_bound, end_bound).Examples
use *; use IntoBounds; assert_eq!; assert_eq!;
Provided Methods
fn intersect<R>(self, other: R) -> (Bound<T>, Bound<T>) where Self: Sized, T: ~const Ord, R: Sized + ~const IntoBounds<T>,Compute the intersection of
selfandother.Examples
use *; use IntoBounds; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;Combine with
is_emptyto determine if two ranges overlap.use ; assert!; assert!; assert!;
Implementors
impl<T> IntoBounds<T> for (Bound<T>, Bound<T>)impl<T> IntoBounds<T> for Range<T>impl<T> IntoBounds<T> for Range<T>impl<T> IntoBounds<T> for RangeFrom<T>impl<T> IntoBounds<T> for RangeFrom<T>impl<T> IntoBounds<T> for RangeFullimpl<T> IntoBounds<T> for RangeInclusive<T>impl<T> IntoBounds<T> for RangeInclusive<T>impl<T> IntoBounds<T> for RangeTo<T>impl<T> IntoBounds<T> for RangeToInclusive<T>impl<T> IntoBounds<T> for RangeToInclusive<T>