Struct parser_combinators::combinator::AndThen [] [src]

pub struct AndThen<P, F>(_, _);

Trait Implementations

impl<P, F, O, E> Parser for AndThen<P, F> where P: Parser, F: FnMut(P::Output) -> Result<O, E>, E: Into<Error<P::Input::Item>>
[src]

type Input = P::Input

A type implementing the Stream trait which is the specific type that is parsed. Read more

type Output = O

The type which is returned when the parsing is successful.

fn parse_state(&mut self, input: State<Self::Input>) -> ParseResult<O, Self::Input, Self::Input::Item>

Parses using the state input by calling Stream::uncons one or more times On success returns Ok((value, new_state)) on failure it returns Err(error) Read more

fn parse(&mut self, input: Self::Input) -> Result<(Self::Output, Self::Input)ParseError<Self::Input::Item>>

Entrypoint of the parser Takes some input and tries to parse it returning a ParseResult Read more