pub struct ParsingError<I> {
pub input: I,
pub error: Cow<'static, str>,
pub backtrace: Backtrace,
}
Fields§
§input: I
§error: Cow<'static, str>
§backtrace: Backtrace
Implementations§
Source§impl<'i> ParsingError<&'i str>
impl<'i> ParsingError<&'i str>
Trait Implementations§
Source§impl<I> ContextError<I> for ParsingError<I>
impl<I> ContextError<I> for ParsingError<I>
Source§fn add_context(_input: I, _ctx: &'static str, other: Self) -> Self
fn add_context(_input: I, _ctx: &'static str, other: Self) -> Self
Creates a new error from an input position, a static string and an existing error.
This is used mainly in the context combinator, to add user friendly information
to errors when backtracking through a parse tree
Source§impl Debug for ParsingError<&[u8]>
impl Debug for ParsingError<&[u8]>
Source§impl Debug for ParsingError<&str>
impl Debug for ParsingError<&str>
Source§impl<I> From<(I, &'static str)> for ParsingError<I>
impl<I> From<(I, &'static str)> for ParsingError<I>
Source§impl<I> From<(I, String)> for ParsingError<I>
impl<I> From<(I, String)> for ParsingError<I>
Source§impl<'i> From<ParsingError<&'i [u8]>> for Error
impl<'i> From<ParsingError<&'i [u8]>> for Error
Source§fn from(val: ParsingError<&'i [u8]>) -> Self
fn from(val: ParsingError<&'i [u8]>) -> Self
Converts to this type from the input type.
Source§impl<'i> From<ParsingError<&'i [u8]>> for Error<&'i [u8]>
impl<'i> From<ParsingError<&'i [u8]>> for Error<&'i [u8]>
Source§fn from(val: ParsingError<&'i [u8]>) -> Self
fn from(val: ParsingError<&'i [u8]>) -> Self
Converts to this type from the input type.
Source§impl<'i> From<ParsingError<&'i str>> for Error
impl<'i> From<ParsingError<&'i str>> for Error
Source§fn from(val: ParsingError<&'i str>) -> Self
fn from(val: ParsingError<&'i str>) -> Self
Converts to this type from the input type.
Source§impl<I, E> FromExternalError<I, E> for ParsingError<I>
impl<I, E> FromExternalError<I, E> for ParsingError<I>
Source§fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self
fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self
Creates a new error from an input position, an ErrorKind indicating the
wrapping parser, and an external error
Source§impl<I> ParseError<I> for ParsingError<I>
impl<I> ParseError<I> for ParsingError<I>
Source§fn from_error_kind(input: I, kind: ErrorKind) -> Self
fn from_error_kind(input: I, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
Source§fn append(input: I, kind: ErrorKind, other: Self) -> Self
fn append(input: I, kind: ErrorKind, 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
Source§impl<I: PartialEq> PartialEq for ParsingError<I>
impl<I: PartialEq> PartialEq for ParsingError<I>
Auto Trait Implementations§
impl<I> !Freeze for ParsingError<I>
impl<I> RefUnwindSafe for ParsingError<I>where
I: RefUnwindSafe,
impl<I> Send for ParsingError<I>where
I: Send,
impl<I> Sync for ParsingError<I>where
I: Sync,
impl<I> Unpin for ParsingError<I>where
I: Unpin,
impl<I> UnwindSafe for ParsingError<I>where
I: UnwindSafe,
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