pub struct ParserMapT<PType, M> { /* private fields */ }Trait Implementations§
Source§impl<'a, P, M, I, O, E: ParserError, PType, F> Parser<'a, I, O, E, ParserMapT<PType, M>> for ParserMap<P, I, M, E, F>
impl<'a, P, M, I, O, E: ParserError, PType, F> Parser<'a, I, O, E, ParserMapT<PType, M>> for ParserMap<P, I, M, E, F>
Source§fn fab(&self, input: &mut &'a I) -> Result<O, E>
fn fab(&self, input: &mut &'a I) -> Result<O, E>
Parses the input. This method advances the input reference to the remaining
unparsed input. The method is named “fab” instead of “parse” to avoid conflicts
with the “parse” method of &str.
Source§fn fab_value<V: Clone>(self, value: V) -> Value<Self, V, I, O, E>where
Self: Sized,
fn fab_value<V: Clone>(self, value: V) -> Value<Self, V, I, O, E>where
Self: Sized,
Returns a parser that replaces the output of the underlying parser with V.
Source§fn fab_map<F>(self, func: F) -> ParserMap<Self, I, O, E, F>where
Self: Sized,
fn fab_map<F>(self, func: F) -> ParserMap<Self, I, O, E, F>where
Self: Sized,
This creates a Map parser that applies the function to the
output of the underlying parser.
Source§fn fab_try_map<F>(self, func: F) -> ParserTryMap<Self, I, O, E, F>where
Self: Sized,
fn fab_try_map<F>(self, func: F) -> ParserTryMap<Self, I, O, E, F>where
Self: Sized,
This parser first maps the input, and if the result is Option::Some or Result::Ok,
it unwraps the input. Othewise, the parser fails.
Auto Trait Implementations§
impl<PType, M> Freeze for ParserMapT<PType, M>
impl<PType, M> RefUnwindSafe for ParserMapT<PType, M>where
PType: RefUnwindSafe,
M: RefUnwindSafe,
impl<PType, M> Send for ParserMapT<PType, M>
impl<PType, M> Sync for ParserMapT<PType, M>
impl<PType, M> Unpin for ParserMapT<PType, M>
impl<PType, M> UnwindSafe for ParserMapT<PType, M>where
PType: UnwindSafe,
M: 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