Trait IntoBounds
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: 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: 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 for RangeToInclusive<T>impl<T> IntoBounds for RangeTo<T>impl<T> IntoBounds for (Bound<T>, Bound<T>)impl<T> IntoBounds for RangeToInclusive<T>impl<T> IntoBounds for Range<T>impl<T> IntoBounds for Range<T>impl<T> IntoBounds for RangeFullimpl<T> IntoBounds for RangeInclusive<T>impl<T> IntoBounds for RangeFrom<T>impl<T> IntoBounds for RangeInclusive<T>impl<T> IntoBounds for RangeFrom<T>