Expand description
Implementation of Parser::into
Trait Implementations
sourceimpl<'a, I: Clone, O1, O2: From<O1>, E1, E2: ParseError<I> + From<E1>, F: Parser<I, O1, E1>> Parser<I, O2, E2> for Into<F, O1, O2, E1, E2>
impl<'a, I: Clone, O1, O2: From<O1>, E1, E2: ParseError<I> + From<E1>, F: Parser<I, O1, E1>> Parser<I, O2, E2> for Into<F, O1, O2, E1, E2>
sourcefn parse(&mut self, i: I) -> IResult<I, O2, E2>
fn parse(&mut self, i: I) -> IResult<I, O2, E2>
A parser takes in input type, and returns a Result
containing
either the remaining input and the output value, or an error Read more
sourcefn map<G, O2>(self, g: G) -> Map<Self, G, O> where
G: Fn(O) -> O2,
Self: Sized,
fn map<G, O2>(self, g: G) -> Map<Self, G, O> where
G: Fn(O) -> O2,
Self: Sized,
Maps a function over the result of a parser
sourcefn flat_map<G, H, O2>(self, g: G) -> FlatMap<Self, G, O> where
G: FnMut(O) -> H,
H: Parser<I, O2, E>,
Self: Sized,
fn flat_map<G, H, O2>(self, g: G) -> FlatMap<Self, G, O> where
G: FnMut(O) -> H,
H: Parser<I, O2, E>,
Self: Sized,
Creates a second parser from the output of the first one, then apply over the rest of the input
sourcefn and_then<G, O2>(self, g: G) -> AndThen<Self, G, O> where
G: Parser<O, O2, E>,
Self: Sized,
fn and_then<G, O2>(self, g: G) -> AndThen<Self, G, O> where
G: Parser<O, O2, E>,
Self: Sized,
Applies a second parser over the output of the first one
sourcefn and<G, O2>(self, g: G) -> And<Self, G> where
G: Parser<I, O2, E>,
Self: Sized,
fn and<G, O2>(self, g: G) -> And<Self, G> where
G: Parser<I, O2, E>,
Self: Sized,
Applies a second parser after the first one, return their results as a tuple
Auto Trait Implementations
impl<F, O1, O2, E1, E2> RefUnwindSafe for Into<F, O1, O2, E1, E2> where
E1: RefUnwindSafe,
E2: RefUnwindSafe,
F: RefUnwindSafe,
O1: RefUnwindSafe,
O2: RefUnwindSafe,
impl<F, O1, O2, E1, E2> Send for Into<F, O1, O2, E1, E2> where
E1: Send,
E2: Send,
F: Send,
O1: Send,
O2: Send,
impl<F, O1, O2, E1, E2> Sync for Into<F, O1, O2, E1, E2> where
E1: Sync,
E2: Sync,
F: Sync,
O1: Sync,
O2: Sync,
impl<F, O1, O2, E1, E2> Unpin for Into<F, O1, O2, E1, E2> where
E1: Unpin,
E2: Unpin,
F: Unpin,
O1: Unpin,
O2: Unpin,
impl<F, O1, O2, E1, E2> UnwindSafe for Into<F, O1, O2, E1, E2> where
E1: UnwindSafe,
E2: UnwindSafe,
F: UnwindSafe,
O1: UnwindSafe,
O2: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more