Trait redact_composer_core::timing::RangeOps
source · pub trait RangeOps<T>: RangeBounds<T> {
// Required methods
fn is_empty(&self) -> bool;
fn is_disjoint_from(&self, other: &impl RangeBounds<T>) -> bool;
fn intersects(&self, other: &impl RangeBounds<T>) -> bool;
fn is_before(&self, other: &impl RangeBounds<T>) -> bool;
fn is_after(&self, other: &impl RangeBounds<T>) -> bool;
fn begins_within(&self, other: &impl RangeBounds<T>) -> bool;
fn ends_within(&self, other: &impl RangeBounds<T>) -> bool;
fn contains_range(&self, other: &impl RangeBounds<T>) -> bool;
fn is_contained_by(&self, other: &impl RangeBounds<T>) -> bool;
}
Expand description
Convenient interval comparisons.
Required Methods§
sourcefn is_disjoint_from(&self, other: &impl RangeBounds<T>) -> bool
fn is_disjoint_from(&self, other: &impl RangeBounds<T>) -> bool
Checks if an interval has no overlap with another.
sourcefn intersects(&self, other: &impl RangeBounds<T>) -> bool
fn intersects(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval has some overlap with another.
sourcefn is_before(&self, other: &impl RangeBounds<T>) -> bool
fn is_before(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval ends before the start of another.
sourcefn is_after(&self, other: &impl RangeBounds<T>) -> bool
fn is_after(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval starts after the end of another.
sourcefn begins_within(&self, other: &impl RangeBounds<T>) -> bool
fn begins_within(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval starts within another.
sourcefn ends_within(&self, other: &impl RangeBounds<T>) -> bool
fn ends_within(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval ends within another.
sourcefn contains_range(&self, other: &impl RangeBounds<T>) -> bool
fn contains_range(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval contains another.
sourcefn is_contained_by(&self, other: &impl RangeBounds<T>) -> bool
fn is_contained_by(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval is contained by another.
Object Safety§
This trait is not object safe.