pub struct Interval<T = isize> where
T: Sub<T, Output = T> + Add<T, Output = T> + Copy,
isize: Into<T>, { /* private fields */ }
Expand description
Alternative implementation of interval.
Both core::ops::Range, core::ops::RangeInclusive are convertable to crate::Interval
Implementations
Trait Implementations
sourceimpl<T> Debug for Interval<T> where
T: Sub<T, Output = T> + Add<T, Output = T> + Copy + Debug,
isize: Into<T>,
impl<T> Debug for Interval<T> where
T: Sub<T, Output = T> + Add<T, Output = T> + Copy + Debug,
isize: Into<T>,
sourceimpl<T> From<Range<T>> for Interval<T> where
T: Add<T, Output = T> + Copy + Sub<T, Output = T>,
isize: Into<T>,
impl<T> From<Range<T>> for Interval<T> where
T: Add<T, Output = T> + Copy + Sub<T, Output = T>,
isize: Into<T>,
sourceimpl<T> From<RangeInclusive<T>> for Interval<T> where
T: Add<T, Output = T> + Copy + Sub<T, Output = T>,
isize: Into<T>,
impl<T> From<RangeInclusive<T>> for Interval<T> where
T: Add<T, Output = T> + Copy + Sub<T, Output = T>,
isize: Into<T>,
sourcefn from(src: RangeInclusive<T>) -> Interval<T>
fn from(src: RangeInclusive<T>) -> Interval<T>
Converts to this type from the input type.
sourceimpl<T> IntervalAdapter<T> for Interval<T> where
T: Add<T, Output = T> + Copy + Sub<T, Output = T>,
isize: Into<T>,
impl<T> IntervalAdapter<T> for Interval<T> where
T: Add<T, Output = T> + Copy + Sub<T, Output = T>,
isize: Into<T>,
sourcefn closed_open(&self) -> (T, T)
fn closed_open(&self) -> (T, T)
interval in closed-open format as pair of numbers
sourceimpl<T> PartialEq<Interval<T>> for Interval<T> where
T: Sub<T, Output = T> + Add<T, Output = T> + Copy + PartialEq<T>,
isize: Into<T>,
impl<T> PartialEq<Interval<T>> for Interval<T> where
T: Sub<T, Output = T> + Add<T, Output = T> + Copy + PartialEq<T>,
isize: Into<T>,
impl<T> StructuralPartialEq for Interval<T> where
T: Add<T, Output = T> + Copy + Sub<T, Output = T>,
isize: Into<T>,
Auto Trait Implementations
impl<T> RefUnwindSafe for Interval<T> where
T: RefUnwindSafe,
impl<T> Send for Interval<T> where
T: Send,
impl<T> Sync for Interval<T> where
T: Sync,
impl<T> Unpin for Interval<T> where
T: Unpin,
impl<T> UnwindSafe for Interval<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> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
sourceimpl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
impl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
sourcefn vectorized_into(self) -> Target
fn vectorized_into(self) -> Target
Performs the conversion.