[−][src]Struct rust_lapper::Interval
Represent a range from [start, stop) Inclusive start, exclusive of stop
Fields
start: I
stop: I
val: T
Implementations
impl<I, T> Interval<I, T> where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
[src]
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
pub fn intersect(&self, other: &Interval<I, T>) -> I
[src]
Compute the intsect between two intervals
pub fn overlap(&self, start: I, stop: I) -> bool
[src]
Check if two intervals overlap
Trait Implementations
impl<I: Clone, T: Clone> Clone for Interval<I, T> where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
[src]
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,
[src]
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
impl<I: Eq, T: Eq> Eq for Interval<I, T> where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
[src]
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,
[src]
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
fn cmp(&self, other: &Interval<I, T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<I, T> PartialEq<Interval<I, T>> for Interval<I, T> where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
[src]
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
fn eq(&self, other: &Interval<I, T>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<I, T> PartialOrd<Interval<I, T>> for Interval<I, T> where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
[src]
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<I, T> StructuralEq for Interval<I, T> where
I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
T: Eq + Clone + Send + Sync,
[src]
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,
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,
I: Unpin,
T: Unpin,
impl<I, T> UnwindSafe for Interval<I, T> where
I: UnwindSafe,
T: UnwindSafe,
I: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,