Struct winnow::combinator::TryMap
source · pub struct TryMap<F, G, I, O, O2, E, E2>{ /* private fields */ }
Expand description
Implementation of Parser::try_map
Trait Implementations§
source§impl<F, G, I, O, O2, E, E2> Parser<I, O2, E> for TryMap<F, G, I, O, O2, E, E2>
impl<F, G, I, O, O2, E, E2> Parser<I, O2, E> for TryMap<F, G, I, O, O2, E, E2>
source§fn parse_next(&mut self, input: &mut I) -> PResult<O2, E>
fn parse_next(&mut self, input: &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 default_value<O2>(self) -> DefaultValue<Self, I, O, O2, E>
fn default_value<O2>(self) -> DefaultValue<Self, I, O, O2, E>
Produce a type’s default 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>
fn output_into<O2>(self) -> OutputInto<Self, I, O, O2, E>
Convert the parser’s output to another type using
std::convert::From
Read moresource§fn recognize(self) -> Take<Self, I, O, E>
fn recognize(self) -> Take<Self, I, O, E>
👎Deprecated since 0.6.14: Replaced with
Parser::take
Replaced with
Parser::take
source§fn with_taken(self) -> WithTaken<Self, I, O, E>
fn with_taken(self) -> WithTaken<Self, I, O, E>
Produce the consumed input with the output Read more
source§fn with_recognized(self) -> WithTaken<Self, I, O, E>
fn with_recognized(self) -> WithTaken<Self, I, O, E>
👎Deprecated since 0.6.14: Replaced with
Parser::with_taken
Replaced with
Parser::with_taken
source§fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>
fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>
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>
fn try_map<G, O2, E2>(self, map: G) -> TryMap<Self, G, I, O, O2, E, 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>
fn flat_map<G, H, O2>(self, map: G) -> FlatMap<Self, G, H, I, O, 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>
fn context<C>(self, context: C) -> Context<Self, I, O, E, C>
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, E2> Freeze for TryMap<F, G, I, O, O2, E, E2>
impl<F, G, I, O, O2, E, E2> RefUnwindSafe for TryMap<F, G, I, O, O2, E, E2>where
F: RefUnwindSafe,
G: RefUnwindSafe,
I: RefUnwindSafe,
O: RefUnwindSafe,
O2: RefUnwindSafe,
E: RefUnwindSafe,
E2: RefUnwindSafe,
impl<F, G, I, O, O2, E, E2> Send for TryMap<F, G, I, O, O2, E, E2>
impl<F, G, I, O, O2, E, E2> Sync for TryMap<F, G, I, O, O2, E, E2>
impl<F, G, I, O, O2, E, E2> Unpin for TryMap<F, G, I, O, O2, E, E2>
impl<F, G, I, O, O2, E, E2> UnwindSafe for TryMap<F, G, I, O, O2, E, E2>where
F: UnwindSafe,
G: UnwindSafe,
I: UnwindSafe,
O: UnwindSafe,
O2: UnwindSafe,
E: UnwindSafe,
E2: 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