Enum inari::Overlap[][src]

pub enum Overlap {
    BothEmpty,
    FirstEmpty,
    SecondEmpty,
    Before,
    Meets,
    Overlaps,
    Starts,
    ContainedBy,
    Finishes,
    Equals,
    FinishedBy,
    Contains,
    StartedBy,
    OverlappedBy,
    MetBy,
    After,
}

An overlapping state returned by Interval::overlap.

Variants

BothEmpty

Both self and rhs are empty.

Equivalently, $\self = \rhs = βˆ…$.

FirstEmpty

self is empty while rhs is not.

Equivalently, $\self = βˆ… ∧ \rhs β‰  βˆ…$.

SecondEmpty

rhs is empty while self is not.

Equivalently, $\self β‰  βˆ… ∧ \rhs = βˆ…$.

Before
       a      b
self:  β€’β€”β€”β€”β€”β€”β€”β€’
 rhs:             β€’β€”β€”β€”β€”β€”β€”β€’
                  c      d

Both self and rhs are nonempty and $b < c$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ βˆ€x ∈ \self, βˆ€y ∈ \rhs : x < y$.

Meets
       a      b
self:  β€’β€”β€”β€”β€”β€”β€”β€’
 rhs:         β€’β€”β€”β€”β€”β€”β€”β€’
              c      d

Both self and rhs are nonempty and $a < b ∧ b = c ∧ c < d$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆ€x ∈ \self, βˆ€y ∈ \rhs : x ≀ y) ∧ (βˆƒx ∈ \self, βˆ€y ∈ \rhs : x < y) ∧ (βˆƒx ∈ \self, βˆƒy ∈ \rhs : x = y)$.

Overlaps
       a      b
self:  β€’β€”β€”β€”β€”β€”β€”β€’
 rhs:      β€’β€”β€”β€”β€”β€”β€”β€’
           c      d

Both self and rhs are nonempty and $a < c ∧ c < b ∧ b < d$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆƒx ∈ \self, βˆ€y ∈ \rhs : x < y) ∧ (βˆƒy ∈ \rhs, βˆ€x ∈ \self : x < y) ∧ (βˆƒx ∈ \self, βˆƒy ∈ \rhs : y < x)$.

Starts
       a    b                a,b
self:  β€’β€”β€”β€”β€”β€’          self:  β€’ (point)
 rhs:  β€’β€”β€”β€”β€”β€”β€”β€”β€”β€’       rhs:  β€’β€”β€”β€”β€”β€”β€”β€’
       c        d             c      d

Both self and rhs are nonempty and $a = c ∧ b < d$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆ€y ∈ \rhs, βˆƒx ∈ \self : x ≀ y) ∧ (βˆ€x ∈ \self, βˆƒy ∈ \rhs : y ≀ x) ∧ (βˆƒy ∈ \rhs, βˆ€x ∈ \self : x < y)$.

ContainedBy
         a    b
self:    β€’β€”β€”β€”β€”β€’
 rhs:  β€’β€”β€”β€”β€”β€”β€”β€”β€”β€’
       c        d

Both self and rhs are nonempty and $c < a ∧ b < d$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆƒy ∈ \rhs, βˆ€x ∈ \self : y < x) ∧ (βˆƒy ∈ \rhs, βˆ€x ∈ \self : x < y)$.

Finishes
           a    b                   a,b
self:      β€’β€”β€”β€”β€”β€’      self:         β€’ (point)
 rhs:  β€’β€”β€”β€”β€”β€”β€”β€”β€”β€’       rhs:  β€’β€”β€”β€”β€”β€”β€”β€’
       c        d             c      d

Both self and rhs are nonempty and $c < a ∧ b = d$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆƒy ∈ \rhs, βˆ€x ∈ \self : y < x) ∧ (βˆ€y ∈ \rhs, βˆƒx ∈ \self : y ≀ x) ∧ (βˆ€x ∈ \self, βˆƒy ∈ \rhs : x ≀ y)$.

Equals
       a      b            a,b
self:  β€’β€”β€”β€”β€”β€”β€”β€’      self:  β€’ (point)
 rhs:  β€’β€”β€”β€”β€”β€”β€”β€’       rhs:  β€’ (point)
       c      d            c,d

Both self and rhs are nonempty and $a = c ∧ b = d$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆ€x ∈ \self, βˆƒy ∈ \rhs : x = y) ∧ (βˆ€y ∈ \rhs, βˆƒx ∈ \self : y = x)$.

FinishedBy
       a        b             a      b
self:  β€’β€”β€”β€”β€”β€”β€”β€”β€”β€’      self:  β€’β€”β€”β€”β€”β€”β€”β€’
 rhs:      β€’β€”β€”β€”β€”β€’       rhs:         β€’ (point)
           c    d                   c,d

Both self and rhs are nonempty and $a < c ∧ b = d$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆƒx ∈ \self, βˆ€y ∈ \rhs : x < y) ∧ (βˆ€x ∈ \self, βˆƒy ∈ \rhs : x ≀ y) ∧ (βˆ€y ∈ \rhs, βˆƒx ∈ \self : y ≀ x)$.

Contains
       a        b
self:  β€’β€”β€”β€”β€”β€”β€”β€”β€”β€’
 rhs:    β€’β€”β€”β€”β€”β€’
         c    d

Both self and rhs are nonempty and $a < c ∧ d < b$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆƒx ∈ \self, βˆ€y ∈ \rhs : x < y) ∧ (βˆƒx ∈ \self, βˆ€y ∈ \rhs : y < x)$.

StartedBy
       a        b             a      b
self:  β€’β€”β€”β€”β€”β€”β€”β€”β€”β€’      self:  β€’β€”β€”β€”β€”β€”β€”β€’
 rhs:  β€’β€”β€”β€”β€”β€’           rhs:  β€’ (point)
       c    d                c,d

Both self and rhs are nonempty and $a = c ∧ d < b$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆ€x ∈ \self, βˆƒy ∈ \rhs : y ≀ x) ∧ (βˆ€y ∈ \rhs, βˆƒx ∈ \self : x ≀ y) ∧ (βˆƒx ∈ \self, βˆ€y ∈ \rhs : y < x)$.

OverlappedBy
           a      b
self:      β€’β€”β€”β€”β€”β€”β€”β€’
 rhs:  β€’β€”β€”β€”β€”β€”β€”β€’
       c      d

Both self and rhs are nonempty and $c < a ∧ a < d ∧ d < b$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆƒy ∈ \rhs, βˆ€x ∈ \self : y < x) ∧ (βˆƒx ∈ \self, βˆ€y ∈ \rhs : y < x) ∧ (βˆƒy ∈ \rhs, βˆƒx ∈ \self : x < y)$.

MetBy
              a      b
self:         β€’β€”β€”β€”β€”β€”β€”β€’
 rhs:  β€’β€”β€”β€”β€”β€”β€”β€’
       c      d

Both self and rhs are nonempty and $c < d ∧ a = d ∧ a < b$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ (βˆ€y ∈ \rhs, βˆ€x ∈ \self : y ≀ x) ∧ (βˆƒy ∈ \rhs, βˆƒx ∈ \self : y = x) ∧ (βˆƒy ∈ \rhs, βˆ€x ∈ \self : y < x)$.

After
                  a      b
self:             β€’β€”β€”β€”β€”β€”β€”β€’
 rhs:  β€’β€”β€”β€”β€”β€”β€”β€’
       c      d

Both self and rhs are nonempty and $d < a$.

Equivalently, $\self β‰  βˆ… ∧ \rhs β‰  βˆ… ∧ βˆ€y ∈ \rhs, βˆ€x ∈ \self : y < x$.

Trait Implementations

impl Clone for Overlap[src]

impl Copy for Overlap[src]

impl Debug for Overlap[src]

impl Eq for Overlap[src]

impl PartialEq<Overlap> for Overlap[src]

impl StructuralEq for Overlap[src]

impl StructuralPartialEq for Overlap[src]

Auto Trait Implementations

impl RefUnwindSafe for Overlap

impl Send for Overlap

impl Sync for Overlap

impl Unpin for Overlap

impl UnwindSafe for Overlap

Blanket Implementations

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

impl<T> Az for T[src]

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

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

impl<T> CheckedAs for T[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<T> OverflowingAs for T[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> SaturatingAs for T[src]

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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.

impl<T> UnwrappedAs for T[src]

impl<T> WrappingAs for T[src]