# Struct regex_syntax::Error [−] [src]

    pub struct Error {
        // some fields omitted
    }

A parse error.

This includes details about the specific type of error and a rough approximation of where it occurred.

## Methods

### `impl Error`

#### `fn position(&self) -> usize`

Returns an approximate character offset at which the error occurred.

The character offset may be equal to the number of characters in the string, in which case it should be interpreted as pointing to the end of the regex.

#### `fn kind(&self) -> &ErrorKind`

Returns the type of the regex parse error.

## Trait Implementations

### `impl Error for Error`

#### `fn description(&self) -> &str`

#### `fn cause(&self) -> Option<&Error>`1.0.0

### `impl Display for Error`

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

### Derived Implementations

### `impl PartialEq for Error`

#### `fn eq(&self, __arg_0: &Error) -> bool`

#### `fn ne(&self, __arg_0: &Error) -> bool`

### `impl Debug for Error`

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

### `impl Clone for Error`

#### `fn clone(&self) -> Error`

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