Struct regex_syntax::hir::interval::IntervalSet [−][src]
pub struct IntervalSet<I> { ranges: Vec<I>, }
Fields
ranges: Vec<I>
Methods
impl<I: Interval> IntervalSet<I>
[src]
impl<I: Interval> IntervalSet<I>
pub fn new<T: IntoIterator<Item = I>>(intervals: T) -> IntervalSet<I>
[src]
pub fn new<T: IntoIterator<Item = I>>(intervals: T) -> IntervalSet<I>
Create a new set from a sequence of intervals. Each interval is specified as a pair of bounds, where both bounds are inclusive.
The given ranges do not need to be in any specific order, and ranges may overlap.
pub fn push(&mut self, interval: I)
[src]
pub fn push(&mut self, interval: I)
Add a new interval to this set.
ⓘImportant traits for IntervalSetIter<'a, I>pub fn iter(&self) -> IntervalSetIter<I>
[src]
pub fn iter(&self) -> IntervalSetIter<I>
Return an iterator over all intervals in this set.
The iterator yields intervals in ascending order.
pub fn intervals(&self) -> &[I]
[src]
pub fn intervals(&self) -> &[I]
Return an immutable slice of intervals in this set.
The sequence returned is in canonical ordering.
pub fn case_fold_simple(&mut self)
[src]
pub fn case_fold_simple(&mut self)
Expand this interval set such that it contains all case folded
characters. For example, if this class consists of the range a-z
,
then applying case folding will result in the class containing both the
ranges a-z
and A-Z
.
pub fn union(&mut self, other: &IntervalSet<I>)
[src]
pub fn union(&mut self, other: &IntervalSet<I>)
Union this set with the given set, in place.
pub fn intersect(&mut self, other: &IntervalSet<I>)
[src]
pub fn intersect(&mut self, other: &IntervalSet<I>)
Intersect this set with the given set, in place.
pub fn difference(&mut self, other: &IntervalSet<I>)
[src]
pub fn difference(&mut self, other: &IntervalSet<I>)
Subtract the given set from this set, in place.
pub fn symmetric_difference(&mut self, other: &IntervalSet<I>)
[src]
pub fn symmetric_difference(&mut self, other: &IntervalSet<I>)
Compute the symmetric difference of the two sets, in place.
This computes the symmetric difference of two interval sets. This removes all elements in this set that are also in the given set, but also adds all elements from the given set that aren't in this set. That is, the set will contain all elements in either set, but will not contain any elements that are in both sets.
pub fn negate(&mut self)
[src]
pub fn negate(&mut self)
Negate this interval set.
For all x
where x
is any element, if x
was in this set, then it
will not be in this set after negation.
fn canonicalize(&mut self)
[src]
fn canonicalize(&mut self)
Converts this set into a canonical ordering.
fn is_canonical(&self) -> bool
[src]
fn is_canonical(&self) -> bool
Returns true if and only if this class is in a canonical ordering.
Trait Implementations
impl<I: Clone> Clone for IntervalSet<I>
[src]
impl<I: Clone> Clone for IntervalSet<I>
fn clone(&self) -> IntervalSet<I>
[src]
fn clone(&self) -> IntervalSet<I>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<I: Debug> Debug for IntervalSet<I>
[src]
impl<I: Debug> Debug for IntervalSet<I>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<I: Eq> Eq for IntervalSet<I>
[src]
impl<I: Eq> Eq for IntervalSet<I>
fn assert_receiver_is_total_eq(&self)
[src]
fn assert_receiver_is_total_eq(&self)
impl<I: PartialEq> PartialEq for IntervalSet<I>
[src]
impl<I: PartialEq> PartialEq for IntervalSet<I>
fn eq(&self, other: &IntervalSet<I>) -> bool
[src]
fn eq(&self, other: &IntervalSet<I>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &IntervalSet<I>) -> bool
[src]
fn ne(&self, other: &IntervalSet<I>) -> bool
This method tests for !=
.
Auto Trait Implementations
impl<I> Send for IntervalSet<I> where
I: Send,
impl<I> Send for IntervalSet<I> where
I: Send,
impl<I> Sync for IntervalSet<I> where
I: Sync,
impl<I> Sync for IntervalSet<I> where
I: Sync,