Struct rust_lapper::Interval
source · [−]pub struct Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,{
pub start: I,
pub stop: I,
pub val: T,
}
Expand description
Represent a range from [start, stop) Inclusive start, exclusive of stop
Fields
start: I
stop: I
val: T
Implementations
Trait Implementations
sourceimpl<I: Clone, T: Clone> Clone for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
impl<I: Clone, T: Clone> Clone for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
sourceimpl<I: Debug, T: Debug> Debug for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
impl<I: Debug, T: Debug> Debug for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
sourceimpl<I, T> Ord for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
impl<I, T> Ord for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<I, T> PartialEq<Interval<I, T>> for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
impl<I, T> PartialEq<Interval<I, T>> for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
sourceimpl<I, T> PartialOrd<Interval<I, T>> for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
impl<I, T> PartialOrd<Interval<I, T>> for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<I: Eq, T: Eq> Eq for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
impl<I, T> StructuralEq for Interval<I, T>where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
Auto Trait Implementations
impl<I, T> RefUnwindSafe for Interval<I, T>where
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, T> Send for Interval<I, T>
impl<I, T> Sync for Interval<I, T>
impl<I, T> Unpin for Interval<I, T>where
I: Unpin,
T: Unpin,
impl<I, T> UnwindSafe for Interval<I, T>where
I: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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