Trait winnow::RecoverableParser

source ·
pub trait RecoverableParser<I, O, R, E> {
    // Required method
    fn recoverable_parse(&mut self, input: I) -> (I, Option<O>, Vec<R>);
}
Available on crate features unstable-recover and std only.
Expand description

Collect all errors when parsing the input

Parsers will need to use Recoverable<I, _> for their input.

Required Methods§

source

fn recoverable_parse(&mut self, input: I) -> (I, Option<O>, Vec<R>)

Collect all errors when parsing the input

If self fails, this acts like Parser::resume_after and returns Ok(None). Generally, this should be avoided by using Parser::retry_after and Parser::resume_after throughout your parser.

The empty input is returned to allow turning the errors into ParserErrors.

Implementors§

source§

impl<P, I, O, R, E> RecoverableParser<I, O, R, E> for P