pub enum Overlap {
Show 16 variants
BothEmpty,
FirstEmpty,
SecondEmpty,
Before,
Meets,
Overlaps,
Starts,
ContainedBy,
Finishes,
Equals,
FinishedBy,
Contains,
StartedBy,
OverlappedBy,
MetBy,
After,
}
Expand description
The overlapping state between intervals, returned by Interval::overlap
.
Quick Reference
self
relative to rhs
:
rhs
c d
β’ββββββββ’
ββ a b : :
β B β’ββββ’ : :
β M β’ββββ’ : rhs
β O β’ββββ’ : c=d
β S β’ββββ’ : β’
β S β’ : ββ a b :
β Cb : β’ββββ’ : β B β’ββββ’ :
β : β’ββββ’ F β β’ E
self β : β’ F self β β’ββββ’ Fb
β β’ββββββββ’ E β β’ββββ’ C
β β’ββββββββββ’ Fb β β’ββββ’ Sb
β β’ββββββββββββ’ C β : β’ββββ’ A
β β’ββββββββββ’ Sb ββ : a b
β : β’ββββ’ Ob β’
β : β’ββββ’ Mb c=d
β : : β’ββββ’ A
ββ : : a b
β’ββββββββ’
c d
rhs
relative to self
:
self
a b
β’ββββββββ’
ββ : : c d
β : : β’ββββ’ B
β : β’ββββ’ M self
β : β’ββββ’ O a=b
β β’ββββββββββ’ S β’
β β’ββββββββββββ’ Cb ββ : c d
β β’ββββββββββ’ F β : β’ββββ’ B
β β’ββββββββ’ E β β’ββββ’ S
rhs β : β’ββββ’ Fb rhs β β’ββββ’ Cb
β : β’ Fb β β’ββββ’ F
β C : β’ββββ’ : β β’ E
β Sb β’ββββ’ : β A β’ββββ’ :
β Sb β’ : ββ c d :
β Ob β’ββββ’ : β’
β Mb β’ββββ’ : a=b
β A β’ββββ’ : :
ββ c d : :
β’ββββββββ’
a b
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
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $b < c$.
Equivalently,
$$ \self β β β§ \rhs β β β§ βx β \self, βy β \rhs : x < y. $$
a b
self: β’βββββββ’
rhs: β’βββββββ’
c d
Inverse: Overlap::After
.
Meets
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $a < b β§ b = c β§ c < d$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βx β \self, βy β \rhs : x β€ y \\ &β§ βx β \self, βy β \rhs : x < y \\ &β§ βx β \self, βy β \rhs : x = y. \end{align*} $$
a b
self: β’βββββββ’
rhs: β’βββββββ’
c d
Inverse: Overlap::MetBy
.
Overlaps
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $a < c β§ c < b β§ b < d$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βx β \self, βy β \rhs : x < y \\ &β§ βy β \rhs, βx β \self : x < y \\ &β§ βx β \self, βy β \rhs : y < x. \end{align*} $$
a b
self: β’βββββββ’
rhs: β’βββββββ’
c d
Inverse: Overlap::OverlappedBy
.
Starts
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $a = c β§ b < d$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βy β \rhs, βx β \self : x β€ y \\ &β§ βx β \self, βy β \rhs : y β€ x \\ &β§ βy β \rhs, βx β \self : x < y. \end{align*} $$
a b : a=b
self: β’βββββ’ : self: β’
rhs: β’βββββββββ’ : rhs: β’βββββββ’
c d : c d
Inverse: Overlap::StartedBy
.
ContainedBy
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $c < a β§ b < d$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βy β \rhs, βx β \self : y < x \\ &β§ βy β \rhs, βx β \self : x < y. \end{align*} $$
a b
self: β’βββββ’
rhs: β’βββββββββ’
c d
Inverse: Overlap::Contains
.
Finishes
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $c < a β§ b = d$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βy β \rhs, βx β \self : y < x \\ &β§ βy β \rhs, βx β \self : y β€ x \\ &β§ βx β \self, βy β \rhs : x β€ y. \end{align*} $$
a b : a=b
self: β’βββββ’ : self: β’
rhs: β’βββββββββ’ : rhs: β’βββββββ’
c d : c d
Inverse: Overlap::FinishedBy
.
Equals
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $a = c β§ b = d$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βx β \self, βy β \rhs : x = y \\ &β§ βy β \rhs, βx β \self : y = x. \end{align*} $$
a b : a=b
self: β’βββββββ’ : self: β’
rhs: β’βββββββ’ : rhs: β’
c d : c=d
FinishedBy
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $a < c β§ b = d$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βx β \self, βy β \rhs : x < y \\ &β§ βx β \self, βy β \rhs : x β€ y \\ &β§ βy β \rhs, βx β \self : y β€ x. \end{align*} $$
a b : a b
self: β’βββββββββ’ : self: β’βββββββ’
rhs: β’βββββ’ : rhs: β’
c d : c=d
Inverse: Overlap::Finishes
.
Contains
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $a < c β§ d < b$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βx β \self, βy β \rhs : x < y \\ &β§ βx β \self, βy β \rhs : y < x. \end{align*} $$
a b
self: β’βββββββββ’
rhs: β’βββββ’
c d
Inverse: Overlap::ContainedBy
.
StartedBy
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $a = c β§ d < b$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βx β \self, βy β \rhs : y β€ x \\ &β§ βy β \rhs, βx β \self : x β€ y \\ &β§ βx β \self, βy β \rhs : y < x. \end{align*} $$
a b : a b
self: β’βββββββββ’ : self: β’βββββββ’
rhs: β’βββββ’ : rhs: β’
c d : c=d
Inverse: Overlap::Starts
.
OverlappedBy
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $c < a β§ a < d β§ d < b$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βy β \rhs, βx β \self : y < x \\ &β§ βx β \self, βy β \rhs : y < x \\ &β§ βy β \rhs, βx β \self : x < y. \end{align*} $$
a b
self: β’βββββββ’
rhs: β’βββββββ’
c d
Inverse: Overlap::Overlaps
.
MetBy
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $c < d β§ a = d β§ a < b$.
Equivalently,
$$ \begin{align*} \self β β β§ \rhs β β &β§ βy β \rhs, βx β \self : y β€ x \\ &β§ βy β \rhs, βx β \self : y = x \\ &β§ βy β \rhs, βx β \self : y < x. \end{align*} $$
a b
self: β’βββββββ’
rhs: β’βββββββ’
c d
Inverse: Overlap::Meets
.
After
Both $\self = [a, b]$ and $rhs = [c, d]$ are nonempty and $d < a$.
Equivalently,
$$ \self β β β§ \rhs β β β§ βy β \rhs, βx β \self : y < x. $$
a b
self: β’βββββββ’
rhs: β’βββββββ’
c d
Inverse: Overlap::Before
.
Trait Implementations
impl Copy for Overlap
impl Eq for Overlap
impl StructuralEq for Overlap
impl StructuralPartialEq for Overlap
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.