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>
Notable traits for Iter<'a, T>
impl<'a, T> Iterator for Iter<'a, T> type Item = (Bound<&'a T>, Bound<&'a 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

the boundaries as a reference - must be strictly sorted

Provided methods

true if the value is contained in the range set

true if the range set is empty

true if the range set contains all values

true if this range set is disjoint from another range set

true if this range set is a superset of another range set

A range set is considered to be a superset of itself

true if this range set is a subset of another range set

A range set is considered to be a subset of itself

iterate over all ranges in this range set

Implementors