Struct winnow::combinator::AndThen
source · pub struct AndThen<F, G, I, O, O2, E>where
F: Parser<I, O, E>,
G: Parser<O, O2, E>,
O: StreamIsPartial,
I: Stream,{ /* private fields */ }
Expand description
Implementation of Parser::and_then
Trait Implementations§
source§impl<F, G, I, O, O2, E> Parser<I, O2, E> for AndThen<F, G, I, O, O2, E>where
F: Parser<I, O, E>,
G: Parser<O, O2, E>,
O: StreamIsPartial,
I: Stream,
impl<F, G, I, O, O2, E> Parser<I, O2, E> for AndThen<F, G, I, O, O2, E>where F: Parser<I, O, E>, G: Parser<O, O2, E>, O: StreamIsPartial, I: Stream,
source§fn parse_next(&mut self, i: &mut I) -> PResult<O2, E>
fn parse_next(&mut self, i: &mut I) -> PResult<O2, E>
source§fn parse_peek(&mut self, input: I) -> IResult<I, O, E>
fn parse_peek(&mut self, input: I) -> IResult<I, O, E>
source§fn by_ref(&mut self) -> ByRef<'_, Self>where
Self: Sized,
fn by_ref(&mut self) -> ByRef<'_, Self>where Self: Sized,
Treat
&mut Self
as a parser Read moresource§fn value<O2>(self, val: O2) -> Value<Self, I, O, O2, E>where
Self: Sized,
O2: Clone,
fn value<O2>(self, val: O2) -> Value<Self, I, O, O2, E>where Self: Sized, O2: Clone,
Produce the provided value Read more
source§fn void(self) -> Void<Self, I, O, E>where
Self: Sized,
fn void(self) -> Void<Self, I, O, E>where Self: Sized,
Discards the output of the
Parser
Read moresource§fn output_into<O2>(self) -> OutputInto<Self, I, O, O2, E>where
Self: Sized,
O: Into<O2>,
fn output_into<O2>(self) -> OutputInto<Self, I, O, O2, E>where Self: Sized, O: Into<O2>,
Convert the parser’s output to another type using
std::convert::From
Read moresource§fn recognize(self) -> Recognize<Self, I, O, E>where
Self: Sized,
I: Stream,
fn recognize(self) -> Recognize<Self, I, O, E>where Self: Sized, I: Stream,
Produce the consumed input as produced value. Read more
source§fn with_recognized(self) -> WithRecognized<Self, I, O, E>where
Self: Sized,
I: Stream,
fn with_recognized(self) -> WithRecognized<Self, I, O, E>where Self: Sized, I: Stream,
Produce the consumed input with the output Read more
source§fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>where
G: Fn(O) -> O2,
Self: Sized,
fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>where G: Fn(O) -> O2, Self: Sized,
Maps a function over the output of a parser Read more
source§fn try_map<G, O2, E2>(self, map: G) -> TryMap<Self, G, I, O, O2, E, E2>where
Self: Sized,
G: FnMut(O) -> Result<O2, E2>,
I: Stream,
E: FromExternalError<I, E2>,
fn try_map<G, O2, E2>(self, map: G) -> TryMap<Self, G, I, O, O2, E, E2>where Self: Sized, G: FnMut(O) -> Result<O2, E2>, I: Stream, E: FromExternalError<I, E2>,
Applies a function returning a
Result
over the output of a parser. Read moresource§fn flat_map<G, H, O2>(self, map: G) -> FlatMap<Self, G, H, I, O, O2, E>where
Self: Sized,
G: FnMut(O) -> H,
H: Parser<I, O2, E>,
fn flat_map<G, H, O2>(self, map: G) -> FlatMap<Self, G, H, I, O, O2, E>where Self: Sized, G: FnMut(O) -> H, H: Parser<I, O2, E>,
Creates a parser from the output of this one Read more
source§fn context<C>(self, context: C) -> Context<Self, I, O, E, C>where
Self: Sized,
I: Stream,
E: AddContext<I, C>,
C: Clone + Debug,
fn context<C>(self, context: C) -> Context<Self, I, O, E, C>where Self: Sized, I: Stream, E: AddContext<I, C>, C: Clone + Debug,
If parsing fails, add context to the error Read more
source§fn complete_err(self) -> CompleteErr<Self>where
Self: Sized,
fn complete_err(self) -> CompleteErr<Self>where Self: Sized,
Auto Trait Implementations§
impl<F, G, I, O, O2, E> RefUnwindSafe for AndThen<F, G, I, O, O2, E>where E: RefUnwindSafe, F: RefUnwindSafe, G: RefUnwindSafe, I: RefUnwindSafe, O: RefUnwindSafe, O2: RefUnwindSafe,
impl<F, G, I, O, O2, E> Send for AndThen<F, G, I, O, O2, E>where E: Send, F: Send, G: Send, I: Send, O: Send, O2: Send,
impl<F, G, I, O, O2, E> Sync for AndThen<F, G, I, O, O2, E>where E: Sync, F: Sync, G: Sync, I: Sync, O: Sync, O2: Sync,
impl<F, G, I, O, O2, E> Unpin for AndThen<F, G, I, O, O2, E>where E: Unpin, F: Unpin, G: Unpin, I: Unpin, O: Unpin, O2: Unpin,
impl<F, G, I, O, O2, E> UnwindSafe for AndThen<F, G, I, O, O2, E>where E: UnwindSafe, F: UnwindSafe, G: UnwindSafe, I: UnwindSafe, O: UnwindSafe, O2: 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