pub enum ParserError {
Leaf {
context: Vec<&'static str>,
},
Inter {
context: Vec<&'static str>,
source: Box<ParserError>,
},
Other {
context: Vec<&'static str>,
source: Box<dyn Error + Sync + Send + 'static>,
},
}
Variants§
Trait Implementations§
Source§impl<I: Stream> AddContext<I> for ParserError
impl<I: Stream> AddContext<I> for ParserError
Source§fn add_context(
self,
_input: &I,
_token_start: &<I as Stream>::Checkpoint,
c: &'static str,
) -> Self
fn add_context( self, _input: &I, _token_start: &<I as Stream>::Checkpoint, c: &'static str, ) -> Self
Append to an existing error custom data Read more
Source§impl Debug for ParserError
impl Debug for ParserError
Source§impl Display for ParserError
impl Display for ParserError
Source§impl Error for ParserError
impl Error for ParserError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for ParserError
impl ErrorCompat for ParserError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source
. Read moreSource§impl ErrorConvert<ParserError> for ParserError
impl ErrorConvert<ParserError> for ParserError
Source§fn convert(self) -> ParserError
fn convert(self) -> ParserError
Transform to another error type
Source§impl<I> From<ParseError<I, ParserError>> for ParserError
impl<I> From<ParseError<I, ParserError>> for ParserError
Source§fn from(value: ParseError<I, ParserError>) -> Self
fn from(value: ParseError<I, ParserError>) -> Self
Converts to this type from the input type.
Source§impl<I, E: Error + Send + Sync + 'static> FromExternalError<I, E> for ParserError
impl<I, E: Error + Send + Sync + 'static> FromExternalError<I, E> for ParserError
Source§fn from_external_error(_: &I, e: E) -> Self
fn from_external_error(_: &I, e: E) -> Self
Like
ParserError::from_input
but also include an external error.Source§impl<I: Stream> ParserError<I> for ParserError
impl<I: Stream> ParserError<I> for ParserError
Source§type Inner = ParserError
type Inner = ParserError
Generally,
Self
Read moreSource§fn append(self, _: &I, _: &<I as Stream>::Checkpoint) -> Self
fn append(self, _: &I, _: &<I as Stream>::Checkpoint) -> Self
Like
ParserError::from_input
but merges it with the existing error. Read moreSource§fn from_input(_input: &I) -> Self
fn from_input(_input: &I) -> Self
Creates an error from the input position
Source§fn into_inner(self) -> Result<Self::Inner, Self>
fn into_inner(self) -> Result<Self::Inner, Self>
Unwrap the mode, returning the underlying error, if present
Source§fn assert(input: &I, _message: &'static str) -> Selfwhere
I: Debug,
fn assert(input: &I, _message: &'static str) -> Selfwhere
I: Debug,
Process a parser assertion
Source§fn incomplete(input: &I, _needed: Needed) -> Self
fn incomplete(input: &I, _needed: Needed) -> Self
There was not enough data to determine the appropriate action Read more
Source§fn is_backtrack(&self) -> bool
fn is_backtrack(&self) -> bool
Is backtracking and trying new parse branches allowed?
Auto Trait Implementations§
impl Freeze for ParserError
impl !RefUnwindSafe for ParserError
impl Send for ParserError
impl Sync for ParserError
impl Unpin for ParserError
impl !UnwindSafe for ParserError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more