Struct som_parser_core::And
source · pub struct And<A, B> { /* private fields */ }
Expand description
Sequences two parsers, one after the other, collecting both results.
Trait Implementations§
source§impl<T1, T2, A, B, I> Parser<(T1, T2), I> for And<A, B>
impl<T1, T2, A, B, I> Parser<(T1, T2), I> for And<A, B>
source§fn parse<'a>(&mut self, input: I) -> Option<((T1, T2), I)>
fn parse<'a>(&mut self, input: I) -> Option<((T1, T2), I)>
Applies the parser on some input. Read more
source§fn and<U, P: Parser<U, I>>(self, parser: P) -> And<Self, P>
fn and<U, P: Parser<U, I>>(self, parser: P) -> And<Self, P>
Sequences two parsers, one after the other, collecting both results.
source§fn or<P: Parser<T, I>>(self, parser: P) -> Or<Self, P>
fn or<P: Parser<T, I>>(self, parser: P) -> Or<Self, P>
Tries to apply the first parser, if it fails, it tries to apply the second parser.
source§fn map<F: Fn(T) -> U, U>(self, func: F) -> Map<Self, F, T>
fn map<F: Fn(T) -> U, U>(self, func: F) -> Map<Self, F, T>
Maps a function over the output value of the parser.
Auto Trait Implementations§
impl<A, B> Freeze for And<A, B>
impl<A, B> RefUnwindSafe for And<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for And<A, B>
impl<A, B> Sync for And<A, B>
impl<A, B> Unpin for And<A, B>
impl<A, B> UnwindSafe for And<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