pub type IResult<I, O, E = Error<I>> = Result<(I, O), Err<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 (I, nom8::ErrorKind)
)
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 nom8::Err
.
Outside of the parsing code, you can use the FinishIResult::finish
method to convert
it to a more common result type
Trait Implementations§
source§impl<I, O, E> FinishIResult<I, O, E> for IResult<I, O, E>where
I: InputLength + IntoOutput + InputIsStreaming<false> + Clone,
E: ParseError<I>,
impl<I, O, E> FinishIResult<I, O, E> for IResult<I, O, E>where I: InputLength + IntoOutput + InputIsStreaming<false> + Clone, E: ParseError<I>,
source§impl<I, E> IntoOutputIResult<I, <I as IntoOutput>::Output, E> for IResult<I, I, E>where
I: IntoOutput,
impl<I, E> IntoOutputIResult<I, <I as IntoOutput>::Output, E> for IResult<I, I, E>where I: IntoOutput,
source§fn into_output(self) -> IResult<I, <I as IntoOutput>::Output, E>
fn into_output(self) -> IResult<I, <I as IntoOutput>::Output, E>
Convert an
Input
into an appropriate Output
type