pub type Error<'a> = SpannedError<&'a str>;
Expand description
Error with code span available as a string reference.
Aliased Type§
pub struct Error<'a> { /* private fields */ }
Trait Implementations§
Source§impl<'a> ContextError<LocatedSpan<&'a str>> for Error<'a>
impl<'a> ContextError<LocatedSpan<&'a str>> for Error<'a>
Source§impl<'a> FromExternalError<LocatedSpan<&'a str>, ErrorKind> for Error<'a>
impl<'a> FromExternalError<LocatedSpan<&'a str>, ErrorKind> for Error<'a>
Source§fn from_external_error(
input: InputSpan<'a>,
_: NomErrorKind,
err: ErrorKind,
) -> Self
fn from_external_error( input: InputSpan<'a>, _: NomErrorKind, err: ErrorKind, ) -> Self
Creates a new error from an input position, an ErrorKind indicating the
wrapping parser, and an external error
Source§impl<'a> ParseError<LocatedSpan<&'a str>> for Error<'a>
impl<'a> ParseError<LocatedSpan<&'a str>> for Error<'a>
Source§fn from_error_kind(input: InputSpan<'a>, kind: NomErrorKind) -> Self
fn from_error_kind(input: InputSpan<'a>, kind: NomErrorKind) -> Self
Creates an error from the input position and an ErrorKind
Source§fn append(_: InputSpan<'a>, _: NomErrorKind, other: Self) -> Self
fn append(_: InputSpan<'a>, _: NomErrorKind, other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way