[][src]Struct munch::P

pub struct P<A>(pub A);

Methods

impl<A, R> P<Repeat<A, R>> where
    R: Range
[src]

pub fn collect<C, Input>(self) -> P<Collect<A, R, C>> where
    A: Parser<Input>,
    C: Default + Extend<A::Output>, 
[src]

pub fn join<B, Input>(self, b: B) -> P<Join<A, B, R>> where
    A: Parser<Input>,
    B: Parser<Input, Error = A::Error>, 
[src]

pub fn fold<Acc, F, Input, Output>(
    self,
    acc: Acc,
    f: F
) -> P<Fold<A, R, Acc, F>> where
    A: Parser<Input>,
    Acc: FnMut() -> Output,
    F: FnMut(Output, A::Output) -> Output, 
[src]

impl<A, B, R: Range> P<Join<A, B, R>>[src]

pub fn fold<Init, First, Rest, Input, Output>(
    self,
    init: Init,
    first: First,
    rest: Rest
) -> P<JoinFold<A, B, R, Init, First, Rest>> where
    A: Parser<Input>,
    B: Parser<Input, Error = A::Error>,
    Init: FnMut() -> Output,
    First: FnMut(Output, A::Output) -> Output,
    Rest: FnMut(Output, B::Output, A::Output) -> Output, 
[src]

Trait Implementations

impl<A, Input> Parser<Input> for P<A> where
    A: Parser<Input>, 
[src]

type Output = A::Output

type Error = A::Error

impl<A: Clone> Clone for P<A>[src]

impl<A: Copy> Copy for P<A>[src]

impl<A: PartialEq> PartialEq<P<A>> for P<A>[src]

impl<A: Debug> Debug for P<A>[src]

impl<A, B> BitOr<B> for P<A>[src]

type Output = P<Or<A, B>>

The resulting type after applying the | operator.

impl<A, B> Shl<B> for P<A>[src]

type Output = P<AndSkip<A, B>>

The resulting type after applying the << operator.

impl<A, B> Shr<B> for P<A>[src]

type Output = P<SkipAnd<A, B>>

The resulting type after applying the >> operator.

impl<A> StructuralPartialEq for P<A>[src]

Auto Trait Implementations

impl<A> Send for P<A> where
    A: Send

impl<A> Sync for P<A> where
    A: Sync

impl<A> Unpin for P<A> where
    A: Unpin

impl<A> UnwindSafe for P<A> where
    A: UnwindSafe

impl<A> RefUnwindSafe for P<A> where
    A: RefUnwindSafe

Blanket Implementations

impl<F, Input, Output, Error> Parser<Input> for F where
    F: FnMut(Input, usize) -> Result<(usize, Output), (usize, Error)>, 
[src]

type Output = Output

type Error = Error

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]