InputParseError

Type Alias InputParseError 

Source
pub type InputParseError<'a> = ErrorTree<Input<'a>>;

Aliased Type§

pub enum InputParseError<'a> {
    Base {
        location: Input<'a>,
        kind: BaseErrorKind,
    },
    Stack {
        base: Box<ErrorTree<Input<'a>>>,
        finalized: bool,
        contexts: Vec<(Input<'a>, StackContext)>,
    },
    Alt(Vec<ErrorTree<Input<'a>>>),
}

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: Input<'a>

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

§base: Box<ErrorTree<Input<'a>>>

The original error

§finalized: bool

Whether it was indicated that the “final” useful context has been pushed onto the stack

§contexts: Vec<(Input<'a>, StackContext)>

The stack of contexts attached to that error

§

Alt(Vec<ErrorTree<Input<'a>>>)

A series of parsers were tried at the same location (for instance, via the alt2 combinator) and all of them failed.