[][src]Struct rust_lapper::Interval

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, }

Represent a range from [start, stop) Inclusive start, exclusive of stop

Fields

start: Istop: Ival: T

Implementations

impl<I, T> Interval<I, T> where
    I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
    T: Eq + Clone + Send + Sync
[src]

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]

impl<I: Debug, T: Debug> Debug for Interval<I, T> where
    I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
    T: Eq + Clone + Send + Sync
[src]

impl<I: Eq, T: Eq> Eq for Interval<I, T> where
    I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
    T: Eq + Clone + Send + Sync
[src]

impl<I, T> Ord for Interval<I, T> where
    I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
    T: Eq + Clone + Send + Sync
[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]

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]

impl<I, T> StructuralEq for Interval<I, T> where
    I: PrimInt + Unsigned + Ord + Clone + Send + Sync,
    T: Eq + Clone + Send + Sync
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.