[−][src]Enum ranges::Arrangement
This enum represents all possible arrangements of two GenericRange
s.
Note
The following information is additionally contained if applicable:
- which of the two ranges was
self
andother
- if the overlap is a singleton
- if
start
orother
is a singleton - which of
self
andother
is shorter
This information is the result of the comparison of the starts and ends of both ranges and is
obtained "for free" and should thus be used preferably to other methods like
GenericRange::is_singleton()
.
Variants
Fields of Disjoint
The two ranges have no overlap but the end of the first touches the start of the second.
Diagram
first : |----------|
second: |----------|
Fields of Touching
The two ranges have an overlap of one or more elements.
Diagram
first : |----------|
second : |----------|
first disjoint : |-------|
second disjoint: |-------|
overlap : |--|
Fields of Overlapping
One range is contained in the other.
Diagram
first : |--------------------|
second : |----------|
first disjoint : |----|
second disjoint: |----|
overlap : |----------|
Fields of Containing
Both ranges have the same start but varying endings.
Diagram
first : |-----|
second : |----------|
overlap : |-----|
disjoint: |----|
Fields of Starting
Both ranges have the same end but varying starts.
Diagram
first : |----------|
second : |----|
disjoint: |-----|
overlap : |----|
Fields of Ending
The starts and ends of both ranges are equal.
Diagram
first : |----------|
second: |----------|
equal : |----------|
Fields of Empty
self_empty: Option<bool>
Indicates which of the two inputs of GenericRange::arrangement(&self, &other)
were
empty. Returns None
if both were empty.
Trait Implementations
impl Clone for Arrangement
[src]
fn clone(&self) -> Arrangement
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Arrangement
[src]
impl Debug for Arrangement
[src]
impl Eq for Arrangement
[src]
impl PartialEq<Arrangement> for Arrangement
[src]
fn eq(&self, other: &Arrangement) -> bool
[src]
fn ne(&self, other: &Arrangement) -> bool
[src]
impl StructuralEq for Arrangement
[src]
impl StructuralPartialEq for Arrangement
[src]
Auto Trait Implementations
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>,