Type Definition winnow::error::IResult

source ·
pub type IResult<I, O, E = Error<I>> = Result<(I, O), ErrMode<E>>;
Expand description

Holds the result of Parser

  • Ok((I, O)) is the remaining input and the parsed value
  • Err(ErrMode<E>) is the error along with how to respond to it

By default, the error type (E) is Error

At the top-level of your parser, 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: Stream + StreamIsPartial + Clone, E: ParseError<I>,

source§

fn finish(self) -> Result<O, E>

👎Deprecated since 0.4.0: Replaced with Parser::parse
Converts the parser’s IResult to a type that is more consumable by callers. Read more
source§

fn finish_err(self) -> Result<(I, O), E>

👎Deprecated since 0.4.0: Replaced with Parser::parse
Converts the parser’s IResult to a type that is more consumable by errors. Read more