Enum Relation Copy item path Source pub enum Relation {
Precedes {
is_inverted: bool ,
},
Meets {
is_inverted: bool ,
},
Overlaps {
is_inverted: bool ,
},
Finishes {
is_inverted: bool ,
},
Contains {
is_inverted: bool ,
},
Starts {
is_inverted: bool ,
},
Equals,
}Expand description A type describing the possible relations between two intervals (e.g. s and t).
The relations are comparable (via Ord) by the degree to which s begins before t and then within that by the degree to which s ends before t.
Six pairs of the relations are converses. For example, the converse of “s precedes t” is “t is preceded by s”;
whenever the first relation is true, its converse is true also. The thirteenth, “s equals t”, is its own converse
Precedes { is_inverted: false }:
s: ┌────────┐
t: └────────┘
Precedes { is_inverted: true }:
s: ┌────────┐
t: └────────┘Fields true iff the relation is inverted, otherwise `false.
false => “s precedes t”
true => “s is preceded by t”
Meets { is_inverted: false }:
s: ┌────────┐
t: └────────┘
Meets { is_inverted: true }:
s: ┌────────┐
t: └────────┘Fields true iff the relation is inverted, otherwise `false.
false => “s meets t”
true => “s is met by t”
Overlaps { is_inverted: false }:
s: ┌────────┐
t: └────────┘
Overlaps { is_inverted: true }:
s: ┌────────┐
t: └────────┘Fields true iff the relation is inverted, otherwise `false.
false => “s overlaps t”
true => “s is overlapped by t”
Finishes { is_inverted: false }:
s: ┌────────┐
t: └────────────────┘
`Finishes { is_inverted: true }`:
```plain
s: ┌────────────────┐
t: └────────┘Fields true iff the relation is inverted, otherwise `false.
false => “s finishes t”
true => “s is finished by t”
Contains { is_inverted: false }:
s: ┌────────────────┐
t: └────────┘
Contains { is_inverted: true }:
s: ┌────────┐
t: └────────────────┘Fields true iff the relation is inverted, otherwise `false.
false => “s contains t”
true => “s is contained by t”
Starts { is_inverted: false }:
s: ┌────────┐
t: └────────────────┘
Starts { is_inverted: true }:
s: ┌────────────────┐
t: └────────┘Fields true iff the relation is inverted, otherwise `false.
false => “s starts t”
true => “s is started by t”
Equals:
s: ┌────────┐
t: └────────┘Returns the relation’s converse.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Creates a value from a pair of intervals.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.