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
pattern: &'e str
The original regex pattern in which the error occurred.
err: &'e E
The error kind. It must impl fmt::Display.
span: &'e Span
The primary span of the error.
aux_span: Option<&'e Span>
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]
impl<'e, E: Debug + 'e> Debug for Formatter<'e, E>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'e> From<&'e Error> for Formatter<'e, ErrorKind>[src]
impl<'e> From<&'e Error> for Formatter<'e, ErrorKind>impl<'e> From<&'e Error> for Formatter<'e, ErrorKind>[src]
impl<'e> From<&'e Error> for Formatter<'e, ErrorKind>impl<'e, E: Display> Display for Formatter<'e, E>[src]
impl<'e, E: Display> Display for Formatter<'e, E>