# 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`

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

### `impl PartialOrd<char> for ClassRange`

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

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

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

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

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

### `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`

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

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)