ParseError

Type Alias ParseError 

Source
pub type ParseError<'a> = Err<Error<LocatedSpan<&'a [u8], TracableInfo>>>;
Expand description

Represents a failure in parsing at some point in the combinator chain. Parsing fails eagerly; that is, the first failure point hit will exit with an error. This type returns an error that includes information on the segment of bytes being parsed and the location of the cursor at time of failure.

Aliased Type§

pub enum ParseError<'a> {
    Incomplete(Needed),
    Error(Error<LocatedSpan<&'a [u8], TracableInfo>>),
    Failure(Error<LocatedSpan<&'a [u8], TracableInfo>>),
}

Variants§

§

Incomplete(Needed)

There was not enough data

§

Error(Error<LocatedSpan<&'a [u8], TracableInfo>>)

The parser had an error (recoverable)

§

Failure(Error<LocatedSpan<&'a [u8], TracableInfo>>)

The parser had an unrecoverable error: we got to the right branch and we know other branches won’t work, so backtrack as fast as possible