Trait range_collections::range_set::AbstractRangeSet[][src]

pub trait AbstractRangeSet<T> {
Show 13 methods fn boundaries(&self) -> &[T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
; fn to_range_set<A: Array<Item = T>>(&self) -> RangeSet<A>
    where
        T: Clone
, { ... }
fn contains(&self, value: &T) -> bool
    where
        T: Ord
, { ... }
fn is_empty(&self) -> bool { ... }
fn is_all(&self) -> bool
    where
        T: RangeSetEntry
, { ... }
fn is_disjoint(&self, that: &impl AbstractRangeSet<T>) -> bool
    where
        T: RangeSetEntry
, { ... }
fn is_subset(&self, that: impl AbstractRangeSet<T>) -> bool
    where
        T: Ord
, { ... }
fn is_superset(&self, that: impl AbstractRangeSet<T>) -> bool
    where
        T: Ord
, { ... }
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>);
{ ... }
fn intersection<A>(&self, that: &impl AbstractRangeSet<T>) -> RangeSet<A>
    where
        A: Array<Item = T>,
        T: Ord + Clone
, { ... }
fn union<A>(&self, that: &impl AbstractRangeSet<T>) -> RangeSet<A>
    where
        A: Array<Item = T>,
        T: Ord + Clone
, { ... }
fn difference<A>(&self, that: &impl AbstractRangeSet<T>) -> RangeSet<A>
    where
        A: Array<Item = T>,
        T: Ord + Clone
, { ... }
fn symmetric_difference<A>(
        &self,
        that: &impl AbstractRangeSet<T>
    ) -> RangeSet<A>
    where
        A: Array<Item = T>,
        T: Ord + Clone
, { ... }
}
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

convert to a normal range set

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

intersection

union

difference

symmetric difference (xor)

Implementors