[−][src]Struct munch::P
Methods
impl<A, R> P<Repeat<A, R>> where
R: Range,
[src]
R: Range,
pub fn collect<C, Input>(self) -> P<Collect<A, R, C>> where
A: Parser<Input>,
C: Default + Extend<A::Output>,
[src]
A: Parser<Input>,
C: Default + Extend<A::Output>,
pub fn join<B, Input>(self, b: B) -> P<Join<A, B, R>> where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
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]
self,
acc: Acc,
f: F
) -> P<Fold<A, R, Acc, F>> where
A: Parser<Input>,
Acc: FnMut() -> Output,
F: FnMut(Output, A::Output) -> Output,
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]
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,
Trait Implementations
impl<A, Input> Parser<Input> for P<A> where
A: Parser<Input>,
[src]
A: Parser<Input>,
type Output = A::Output
type Error = A::Error
fn parse(
&mut self,
input: Input,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: Input,
from: usize
) -> Result<Self::Output, Self::Error>
fn p(self) -> P<Self> where
Self: Sized,
[src]
Self: Sized,
fn by_ref(&mut self) -> P<ByRef<Self>> where
Self: Sized,
[src]
Self: Sized,
fn and<B>(self, b: B) -> P<And<Self, B>> where
Self: Sized,
B: Parser<Input, Error = Self::Error>,
[src]
Self: Sized,
B: Parser<Input, Error = Self::Error>,
fn and_skip<B>(self, b: B) -> P<AndSkip<Self, B>> where
Self: Sized,
B: Parser<Input, Error = Self::Error>,
[src]
Self: Sized,
B: Parser<Input, Error = Self::Error>,
fn skip_and<B>(self, b: B) -> P<SkipAnd<Self, B>> where
Self: Sized,
B: Parser<Input, Error = Self::Error>,
[src]
Self: Sized,
B: Parser<Input, Error = Self::Error>,
fn or<B>(self, b: B) -> P<Or<Self, B>> where
Self: Sized,
B: Parser<Input, Output = Self::Output, Error = Self::Error>,
[src]
Self: Sized,
B: Parser<Input, Output = Self::Output, Error = Self::Error>,
fn map<F, Output>(self, f: F) -> P<Map<Self, F>> where
Self: Sized,
F: FnMut(Self::Output) -> Output,
[src]
Self: Sized,
F: FnMut(Self::Output) -> Output,
fn map_err<F, Error>(self, f: F) -> P<MapErr<Self, F>> where
Self: Sized,
F: FnMut(Self::Error) -> Error,
[src]
Self: Sized,
F: FnMut(Self::Error) -> Error,
fn and_then<F, Output>(self, f: F) -> P<AndThen<Self, F>> where
Self: Sized,
F: FnMut(Self::Output) -> Result<Output, Self::Error>,
[src]
Self: Sized,
F: FnMut(Self::Output) -> Result<Output, Self::Error>,
fn optional(self) -> P<Optional<Self>> where
Self: Sized,
[src]
Self: Sized,
fn bind<B, F>(self, f: F) -> P<Bind<Self, F>> where
Self: Sized,
B: Parser<Input, Error = Self::Error>,
F: FnMut(Self::Output) -> B,
[src]
Self: Sized,
B: Parser<Input, Error = Self::Error>,
F: FnMut(Self::Output) -> B,
fn repeat<R>(self, range: R) -> P<Repeat<Self, R>> where
Self: Sized,
R: Range,
[src]
Self: Sized,
R: Range,
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.
fn bitor(self, b: B) -> Self::Output
[src]
impl<A, B> Shl<B> for P<A>
[src]
type Output = P<AndSkip<A, B>>
The resulting type after applying the <<
operator.
fn shl(self, b: B) -> Self::Output
[src]
impl<A, B> Shr<B> for P<A>
[src]
type Output = P<SkipAnd<A, B>>
The resulting type after applying the >>
operator.
fn shr(self, b: B) -> Self::Output
[src]
impl<A> StructuralPartialEq for P<A>
[src]
Auto Trait Implementations
impl<A> Send for P<A> where
A: Send,
A: Send,
impl<A> Sync for P<A> where
A: Sync,
A: Sync,
impl<A> Unpin for P<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for P<A> where
A: UnwindSafe,
A: UnwindSafe,
impl<A> RefUnwindSafe for P<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
Blanket Implementations
impl<F, Input, Output, Error> Parser<Input> for F where
F: FnMut(Input, usize) -> Result<(usize, Output), (usize, Error)>,
[src]
F: FnMut(Input, usize) -> Result<(usize, Output), (usize, Error)>,
type Output = Output
type Error = Error
fn parse(
&mut Self,
Input,
usize
) -> Result<(usize, <F as Parser<Input>>::Output), (usize, <F as Parser<Input>>::Error)>
[src]
&mut Self,
Input,
usize
) -> Result<(usize, <F as Parser<Input>>::Output), (usize, <F as Parser<Input>>::Error)>
fn p(self) -> P<Self> where
Self: Sized,
[src]
Self: Sized,
fn by_ref(&mut self) -> P<ByRef<Self>> where
Self: Sized,
[src]
Self: Sized,
fn and<B>(self, b: B) -> P<And<Self, B>> where
Self: Sized,
B: Parser<Input, Error = Self::Error>,
[src]
Self: Sized,
B: Parser<Input, Error = Self::Error>,
fn and_skip<B>(self, b: B) -> P<AndSkip<Self, B>> where
Self: Sized,
B: Parser<Input, Error = Self::Error>,
[src]
Self: Sized,
B: Parser<Input, Error = Self::Error>,
fn skip_and<B>(self, b: B) -> P<SkipAnd<Self, B>> where
Self: Sized,
B: Parser<Input, Error = Self::Error>,
[src]
Self: Sized,
B: Parser<Input, Error = Self::Error>,
fn or<B>(self, b: B) -> P<Or<Self, B>> where
Self: Sized,
B: Parser<Input, Output = Self::Output, Error = Self::Error>,
[src]
Self: Sized,
B: Parser<Input, Output = Self::Output, Error = Self::Error>,
fn map<F, Output>(self, f: F) -> P<Map<Self, F>> where
Self: Sized,
F: FnMut(Self::Output) -> Output,
[src]
Self: Sized,
F: FnMut(Self::Output) -> Output,
fn map_err<F, Error>(self, f: F) -> P<MapErr<Self, F>> where
Self: Sized,
F: FnMut(Self::Error) -> Error,
[src]
Self: Sized,
F: FnMut(Self::Error) -> Error,
fn and_then<F, Output>(self, f: F) -> P<AndThen<Self, F>> where
Self: Sized,
F: FnMut(Self::Output) -> Result<Output, Self::Error>,
[src]
Self: Sized,
F: FnMut(Self::Output) -> Result<Output, Self::Error>,
fn optional(self) -> P<Optional<Self>> where
Self: Sized,
[src]
Self: Sized,
fn bind<B, F>(self, f: F) -> P<Bind<Self, F>> where
Self: Sized,
B: Parser<Input, Error = Self::Error>,
F: FnMut(Self::Output) -> B,
[src]
Self: Sized,
B: Parser<Input, Error = Self::Error>,
F: FnMut(Self::Output) -> B,
fn repeat<R>(self, range: R) -> P<Repeat<Self, R>> where
Self: Sized,
R: Range,
[src]
Self: Sized,
R: Range,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,