Trait regex_syntax::hir::interval::Interval[][src]

pub trait Interval: Clone + Copy + Debug + Default + Eq + PartialEq + PartialOrd + Ord {
    type Bound: Bound;
    fn lower(&self) -> Self::Bound;
fn upper(&self) -> Self::Bound;
fn set_lower(&mut self, bound: Self::Bound);
fn set_upper(&mut self, bound: Self::Bound);
fn case_fold_simple(&self, intervals: &mut Vec<Self>); fn create(lower: Self::Bound, upper: Self::Bound) -> Self { ... }
fn union(&self, other: &Self) -> Option<Self> { ... }
fn intersect(&self, other: &Self) -> Option<Self> { ... }
fn difference(&self, other: &Self) -> (Option<Self>, Option<Self>) { ... }
fn symmetric_difference(&self, other: &Self) -> (Option<Self>, Option<Self>) { ... }
fn is_contiguous(&self, other: &Self) -> bool { ... }
fn is_intersection_empty(&self, other: &Self) -> bool { ... }
fn is_subset(&self, other: &Self) -> bool { ... } }

Associated Types

Required Methods

Provided Methods

Create a new interval.

Union the given overlapping range into this range.

If the two ranges aren't contiguous, then this returns None.

Intersect this range with the given range and return the result.

If the intersection is empty, then this returns None.

Subtract the given range from this range and return the resulting ranges.

If subtraction would result in an empty range, then no ranges are returned.

Compute the symmetric difference the given range from this range. This returns the union of the two ranges minus its intersection.

Returns true if and only if the two ranges are contiguous. Two ranges are contiguous if and only if the ranges are either overlapping or adjacent.

Returns true if and only if the intersection of this range and the other range is empty.

Returns true if and only if this range is a subset of the other range.

Implementors