Struct regex_syntax::error::Formatter[][src]

pub struct Formatter<'e, E: 'e> {
    pattern: &'e str,
    err: &'e E,
    span: &'e Span,
    aux_span: Option<&'e Span>,
}

A helper type for formatting nice error messages.

This type is responsible for reporting regex parse errors in a nice human readable format. Most of its complexity is from interspersing notational markers pointing out the position where an error occurred.

Fields

The original regex pattern in which the error occurred.

The error kind. It must impl fmt::Display.

The primary span of the error.

An auxiliary and optional span, in case the error needs to point to two locations (e.g., when reporting a duplicate capture group name).

Trait Implementations

impl<'e, E: Debug + 'e> Debug for Formatter<'e, E>
[src]

Formats the value using the given formatter. Read more

impl<'e> From<&'e Error> for Formatter<'e, ErrorKind>
[src]

Performs the conversion.

impl<'e> From<&'e Error> for Formatter<'e, ErrorKind>
[src]

Performs the conversion.

impl<'e, E: Display> Display for Formatter<'e, E>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'e, E> Send for Formatter<'e, E> where
    E: Sync

impl<'e, E> Sync for Formatter<'e, E> where
    E: Sync