Struct regex_syntax::ClassRange [] [src]

pub struct ClassRange {
    pub start: char,
    pub end: char,
}

A single inclusive range in a character class.

Since range boundaries are defined by Unicode scalar values, the boundaries can never be in the open interval (0xD7FF, 0xE000). However, a range may cover codepoints that are not scalar values.

Note that this has a few convenient impls on PartialEq and PartialOrd for testing whether a character is contained inside a given range.

Fields

start

The start character of the range.

This must be less than or equal to end.

end

The end character of the range.

This must be greater than or equal to end.

Trait Implementations

impl PartialEq<char> for ClassRange

fn eq(&self, other: &char) -> bool

1.0.0fn ne(&self, other: &Rhs) -> bool

impl PartialOrd<char> for ClassRange

fn partial_cmp(&self, other: &char) -> Option<Ordering>

1.0.0fn lt(&self, other: &Rhs) -> bool

1.0.0fn le(&self, other: &Rhs) -> bool

1.0.0fn gt(&self, other: &Rhs) -> bool

1.0.0fn ge(&self, other: &Rhs) -> bool

impl Display for ClassRange

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl Ord for ClassRange

fn cmp(&self, __arg_0: &ClassRange) -> Ordering

impl Eq for ClassRange

impl PartialOrd for ClassRange

fn partial_cmp(&self, __arg_0: &ClassRange) -> Option<Ordering>

fn lt(&self, __arg_0: &ClassRange) -> bool

fn le(&self, __arg_0: &ClassRange) -> bool

fn gt(&self, __arg_0: &ClassRange) -> bool

fn ge(&self, __arg_0: &ClassRange) -> bool

impl PartialEq for ClassRange

fn eq(&self, __arg_0: &ClassRange) -> bool

fn ne(&self, __arg_0: &ClassRange) -> bool

impl Debug for ClassRange

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Copy for ClassRange

impl Clone for ClassRange

fn clone(&self) -> ClassRange

1.0.0fn clone_from(&mut self, source: &Self)