Trait range_collections::range_set::AbstractRangeSet [−][src]
pub trait AbstractRangeSet<T: RangeSetEntry> {
fn boundaries(&self) -> &[T];
fn contains(&self, value: &T) -> bool { ... }
fn is_empty(&self) -> bool { ... }
fn is_all(&self) -> bool { ... }
fn is_disjoint(&self, that: &impl AbstractRangeSet<T>) -> bool { ... }
fn is_subset(&self, that: impl AbstractRangeSet<T>) -> bool { ... }
fn is_superset(&self, that: impl AbstractRangeSet<T>) -> bool { ... }
fn iter(&self) -> Iter<'_, T>ⓘ { ... }
}Expand description
Anything that provides sorted boundaries
This is just implemented for ArchivedRangeSet and RangeSet. It probably does not make sense to implement it yourself.
Required methods
fn boundaries(&self) -> &[T]
fn boundaries(&self) -> &[T]
the boundaries as a reference - must be strictly sorted
Provided methods
fn is_disjoint(&self, that: &impl AbstractRangeSet<T>) -> bool
fn is_disjoint(&self, that: &impl AbstractRangeSet<T>) -> bool
true if this range set is disjoint from another range set
fn is_subset(&self, that: impl AbstractRangeSet<T>) -> bool
fn is_subset(&self, that: impl AbstractRangeSet<T>) -> bool
true if this range set is a superset of another range set
A range set is considered to be a superset of itself
fn is_superset(&self, that: impl AbstractRangeSet<T>) -> bool
fn is_superset(&self, that: impl AbstractRangeSet<T>) -> bool
true if this range set is a subset of another range set
A range set is considered to be a subset of itself