pub struct Into<F, O1, O2: From<O1>, E1, E2: From<E1>> {
f: F,
phantom_out1: PhantomData<O1>,
phantom_err1: PhantomData<E1>,
phantom_out2: PhantomData<O2>,
phantom_err2: PhantomData<E2>,
}
Expand description
Implementation of Parser::into
Fields§
§f: F
§phantom_out1: PhantomData<O1>
§phantom_err1: PhantomData<E1>
§phantom_out2: PhantomData<O2>
§phantom_err2: PhantomData<E2>
Trait Implementations§
source§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>
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>
source§fn 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 errorsource§fn flat_map<G, H, O2>(self, g: G) -> FlatMap<Self, G, O>
fn flat_map<G, H, O2>(self, g: G) -> FlatMap<Self, G, O>
Creates a second parser from the output of the first one, then apply over the rest of the input
source§fn and_then<G, O2>(self, g: G) -> AndThen<Self, G, O>
fn and_then<G, O2>(self, g: G) -> AndThen<Self, G, O>
Applies a second parser over the output of the first one
source§fn and<G, O2>(self, g: G) -> And<Self, G>
fn and<G, O2>(self, g: G) -> And<Self, G>
Applies a second parser after the first one, return their results as a tuple
Auto Trait Implementations§
impl<F, O1, O2, E1, E2> Freeze for Into<F, O1, O2, E1, E2>where
F: Freeze,
impl<F, O1, O2, E1, E2> RefUnwindSafe for Into<F, O1, O2, E1, E2>
impl<F, O1, O2, E1, E2> Send for Into<F, O1, O2, E1, E2>
impl<F, O1, O2, E1, E2> Sync for Into<F, O1, O2, E1, E2>
impl<F, O1, O2, E1, E2> Unpin for Into<F, O1, O2, E1, E2>
impl<F, O1, O2, E1, E2> UnwindSafe for Into<F, O1, O2, E1, E2>
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