pub struct Then<A: Parser, B: Parser> { /* private fields */ }Expand description
Applies one parser, discards the result, and returns the second parser’s results if the first
one succeeded. To skip the input consumed by several parsers, use a Sequence combinators as
A.
Implementations§
Trait Implementations§
Source§impl<A: Parser, B: Parser> Parser for Then<A, B>
impl<A: Parser, B: Parser> Parser for Then<A, B>
type Result = <B as Parser>::Result
Source§fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>,
) -> ParseResult<Self::Result>
fn parse( &mut self, st: &mut ParseState<impl Iterator<Item = char>>, ) -> ParseResult<Self::Result>
parse consumes input from
st and returns a result or an error. Read moreAuto Trait Implementations§
impl<A, B> Freeze for Then<A, B>
impl<A, B> RefUnwindSafe for Then<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Then<A, B>
impl<A, B> Sync for Then<A, B>
impl<A, B> Unpin for Then<A, B>
impl<A, B> UnwindSafe for Then<A, B>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more