[][src]Enum inari::OverlappingState

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

States 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 OverlappingState[src]

impl Copy for OverlappingState[src]

impl Debug for OverlappingState[src]

impl Eq for OverlappingState[src]

impl PartialEq<OverlappingState> for OverlappingState[src]

impl StructuralEq for OverlappingState[src]

impl StructuralPartialEq for OverlappingState[src]

Auto Trait Implementations

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> 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> SaturatingAs for 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.

impl<T> WrappingAs for T[src]