pub enum RangesRelation {
Show 13 variants
StrictlyBefore,
StrictlyAfter,
Meets,
IsMet,
Overlaps,
IsOverlapped,
Starts,
IsStarted,
StrictlyContains,
IsStrictlyContained,
Finishes,
IsFinished,
Equal,
}
Variants§
StrictlyBefore
The first range is strictly before the second one with no overlap
[ A ]
[ B ]
StrictlyAfter
The first range is strictly after the second one with no overlap
[ A ]
[ B ]
Meets
[ A ]
[ B ]
IsMet
[ A ]
[ B ]
Overlaps
[ A ]
[ B ]
IsOverlapped
[ A ]
[ B ]
Starts
[ A ]
[ B ]
IsStarted
[ A ]
[ B ]
StrictlyContains
[ A ]
[ B ]
IsStrictlyContained
[ A ]
[ B ]
Finishes
[ A ]
[ B ]
IsFinished
[ A ]
[ B ]
Equal
[ A ]
[ B ]
Implementations§
Source§impl RangesRelation
impl RangesRelation
Sourcepub fn intersects(&self) -> bool
pub fn intersects(&self) -> bool
Returns true if there is any type of overlap between the two ranges
This is equivalend to all the relations except:
Sourcepub fn disjoint(&self) -> bool
pub fn disjoint(&self) -> bool
Returns true if the ranges are completely disjoint
This is equivalend to the relations:
Sourcepub fn contains(&self) -> bool
pub fn contains(&self) -> bool
Returns true if the first range contains the second one.
The equivalent relations are:
RangesRelation::Equal
RangesRelation::StrictlyContains
- [
RangesRelation::Started
] / [RangesRelation::Finished
]
Trait Implementations§
Source§impl Clone for RangesRelation
impl Clone for RangesRelation
Source§fn clone(&self) -> RangesRelation
fn clone(&self) -> RangesRelation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RangesRelation
impl Debug for RangesRelation
Source§impl Hash for RangesRelation
impl Hash for RangesRelation
Source§impl PartialEq for RangesRelation
impl PartialEq for RangesRelation
impl Copy for RangesRelation
impl Eq for RangesRelation
impl StructuralPartialEq for RangesRelation
Auto Trait Implementations§
impl Freeze for RangesRelation
impl RefUnwindSafe for RangesRelation
impl Send for RangesRelation
impl Sync for RangesRelation
impl Unpin for RangesRelation
impl UnwindSafe for RangesRelation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more