Struct parser_combinators::combinator::Or
[−]
[src]
pub struct Or<P1, P2>(_, _) where P1: Parser, P2: Parser;
Trait Implementations
impl<P1: Clone, P2: Clone> Clone for Or<P1, P2> where P1: Parser, P2: Parser
[src]
fn clone(&self) -> Or<P1, P2>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<I, O, P1, P2> Parser for Or<P1, P2> where I: Stream, P1: Parser<Input=I, Output=O>, P2: Parser<Input=I, Output=O>
[src]
type Input = I
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<I>) -> ParseResult<O, I, I::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