Struct regex_syntax::ast::Error [] [src]

pub struct Error { /* fields omitted */ }

An error that occurred while parsing a regular expression into an abstract syntax tree.

Note that note all ASTs represents a valid regular expression. For example, an AST is constructed without error for \p{Quux}, but Quux is not a valid Unicode property name. That particular error is reported when translating an AST to the high-level intermediate representation (HIR).

Methods

impl Error
[src]

[src]

Return the type of this error.

[src]

The original pattern string in which this error occurred.

Every span reported by this error is reported in terms of this string.

[src]

Return the span at which this error occurred.

[src]

Return an auxiliary span. This span exists only for some errors that benefit from being able to point to two locations in the original regular expression. For example, "duplicate" errors will have the main error position set to the duplicate occurrence while its auxiliary span will be set to the initial occurrence.

Trait Implementations

impl Clone for Error
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Error
[src]

[src]

Formats the value using the given formatter. Read more

impl Eq for Error
[src]

impl PartialEq for Error
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Error for Error
[src]

[src]

A short description of the error. Read more

1.0.0
[src]

The lower-level cause of this error, if any. Read more

impl Display for Error
[src]

[src]

Formats the value using the given formatter. Read more

impl From<Error> for Error
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Error

impl Sync for Error