pub struct Between<L, R, P>(/* private fields */)
where
L: Parser,
R: Parser<Input = <L as Parser>::Input>,
P: Parser<Input = <L as Parser>::Input>;
Trait Implementations§
Source§impl<L, R, P> Parser for Between<L, R, P>
impl<L, R, P> Parser for Between<L, R, P>
Source§type Input = <L as Parser>::Input
type Input = <L as Parser>::Input
A type implementing the
Stream
trait which is the specific type
that is parsed.Source§type Output = <Skip<With<L, P>, R> as Parser>::Output
type Output = <Skip<With<L, P>, R> as Parser>::Output
The type which is returned when the parsing is successful.
Source§fn parse_state(
&mut self,
input: State<<Self as Parser>::Input>,
) -> ParseResult<<Self as Parser>::Output, <Self as Parser>::Input, <Self::Input as Stream>::Item>
fn parse_state( &mut self, input: State<<Self as Parser>::Input>, ) -> ParseResult<<Self as Parser>::Output, <Self as Parser>::Input, <Self::Input as Stream>::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)
Source§fn parse_lazy(
&mut self,
input: State<<Self as Parser>::Input>,
) -> ParseResult<<Self as Parser>::Output, <Self as Parser>::Input, <Self::Input as Stream>::Item>
fn parse_lazy( &mut self, input: State<<Self as Parser>::Input>, ) -> ParseResult<<Self as Parser>::Output, <Self as Parser>::Input, <Self::Input as Stream>::Item>
Specialized version of parse_state where the parser does not need to add an error to the
ParseError
when it does not consume any input before encountering the error.
Instead the error can be added later through the add_error
methodAuto Trait Implementations§
impl<L, R, P> Freeze for Between<L, R, P>
impl<L, R, P> RefUnwindSafe for Between<L, R, P>
impl<L, R, P> Send for Between<L, R, P>
impl<L, R, P> Sync for Between<L, R, P>
impl<L, R, P> Unpin for Between<L, R, P>
impl<L, R, P> UnwindSafe for Between<L, R, P>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> ParserExt for Pwhere
P: Parser,
impl<P> ParserExt for Pwhere
P: Parser,
Source§fn with<P2>(self, p: P2) -> With<Self, P2>
fn with<P2>(self, p: P2) -> With<Self, P2>
Discards the value of the
self
parser and returns the value of p
Fails if any of the parsers fails Read moreSource§fn skip<P2>(self, p: P2) -> Skip<Self, P2>
fn skip<P2>(self, p: P2) -> Skip<Self, P2>
Discards the value of the
p
parser and returns the value of self
Fails if any of the parsers fails Read moreSource§fn and<P2>(self, p: P2) -> And<Self, P2>
fn and<P2>(self, p: P2) -> And<Self, P2>
Parses with
self
followed by p
Succeds if both parsers succed, otherwise fails
Returns a tuple with both values on success Read moreSource§fn then<N, F>(self, f: F) -> Then<Self, F>
fn then<N, F>(self, f: F) -> Then<Self, F>
Parses using
self
and then passes the value to f
which returns a parser used to parse
the rest of the input Read moreSource§fn expected<S>(self, msg: S) -> Expected<Self>
fn expected<S>(self, msg: S) -> Expected<Self>
Parses with
self
and if it fails without consuming any input any expected errors are replaced by
msg
. msg
is then used in error messages as “Expected msg
”. Read more