IResult

Type Alias IResult 

Source
pub type IResult<I, O, E = Error<I>> = IResult<I, O, Error<I, E>>;
Expand description

Holds the result of parsing functions.

It depends on the input type I, the output type O, and the error type E (by default nom::error::Error<I>).

The Ok side is a pair containing the remainder of the input (the part of the data that was not parsed) and the produced value. The Err side contains an instance of nom::Err.

Outside of the parsing code, you can use the nom::Finish::finish method to convert it to a more common result type.

Aliased Type§

pub enum IResult<I, O, E = Error<I>> {
    Ok((I, O)),
    Err(Err<Error<I, E>>),
}

Variants§

§1.0.0

Ok((I, O))

Contains the success value

§1.0.0

Err(Err<Error<I, E>>)

Contains the error value