pub enum ErrorTree<I> {
Base {
location: I,
kind: BaseErrorKind,
},
Stack {
base: Box<Self>,
finalized: bool,
contexts: Vec<(I, StackContext)>,
},
Alt(Vec<Self>),
}
Variants§
Base
A specific error event at a specific location. Often this will indicate that something like a tag or character was expected at that location.
Fields
§
location: I
The location of this error in the input
§
kind: BaseErrorKind
The specific error that occurred
Stack
A stack indicates a chain of error contexts was provided. The stack
should be read “backwards”; that is, errors earlier in the Vec
occurred “sooner” (deeper in the call stack).
Fields
Alt(Vec<Self>)
A series of parsers were tried at the same location (for instance, via
the alt2
combinator) and all of them failed.
Implementations§
Trait Implementations§
Source§impl<I: Display + Debug> Error for ErrorTree<I>
impl<I: Display + Debug> Error for ErrorTree<I>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl<I> Freeze for ErrorTree<I>where
I: Freeze,
impl<I> !RefUnwindSafe for ErrorTree<I>
impl<I> Send for ErrorTree<I>where
I: Send,
impl<I> Sync for ErrorTree<I>where
I: Sync,
impl<I> Unpin for ErrorTree<I>where
I: Unpin,
impl<I> !UnwindSafe for ErrorTree<I>
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