Struct arithmetic_parser::Error
source · pub struct Error { /* private fields */ }
Expand description
Parsing error with a generic code span.
Two primary cases of the Span
type param are &str
(for original errors produced by
the parser) and usize
(for stripped errors that have a static lifetime).
Implementations§
Trait Implementations§
source§impl<'a> ContextError<LocatedSpan<&'a str>> for Error
impl<'a> ContextError<LocatedSpan<&'a str>> for Error
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<'a> FromExternalError<LocatedSpan<&'a str>, ErrorKind> for Error
impl<'a> FromExternalError<LocatedSpan<&'a str>, ErrorKind> for Error
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
impl<'a> ParseError<LocatedSpan<&'a str>> for Error
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
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more