pub type Error<I> = ErrorTree<I>;Aliased Type§
pub enum Error<I> {
Base {
location: I,
kind: BaseErrorKind<&'static str, Box<dyn Error + Sync + Send>>,
},
Stack {
base: Box<GenericErrorTree<I, &'static str, &'static str, Box<dyn Error + Sync + Send>>>,
contexts: Vec<(I, StackContext<&'static str>)>,
},
Alt(Vec<GenericErrorTree<I, &'static str, &'static str, Box<dyn Error + Sync + Send>>>),
}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: IThe location of this error in the input
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
§
base: Box<GenericErrorTree<I, &'static str, &'static str, Box<dyn Error + Sync + Send>>>The original error
§
contexts: Vec<(I, StackContext<&'static str>)>The stack of contexts attached to that error
Alt(Vec<GenericErrorTree<I, &'static str, &'static str, Box<dyn Error + Sync + Send>>>)
A series of parsers were tried at the same location (for instance, via
the alt combinator) and all of them failed. All
of the errors in this set are “siblings”.