[−][src]Trait munch::Parser
Associated Types
Loading content...Required methods
Loading content...Provided methods
pub fn p(self) -> P<Self> where
Self: Sized,
[src]
Self: Sized,
pub fn by_ref(&mut self) -> P<ByRef<'_, Self>> where
Self: Sized,
[src]
Self: Sized,
pub 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>,
pub 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>,
pub 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>,
pub 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>,
pub 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,
pub 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,
pub 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>,
pub fn optional(self) -> P<Optional<Self>> where
Self: Sized,
[src]
Self: Sized,
pub 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,
pub fn repeat<R>(self, range: R) -> P<Repeat<Self, R>> where
Self: Sized,
R: Range,
[src]
Self: Sized,
R: Range,
Implementations on Foreign Types
impl<'a> Parser<&'a [u8]> for u8
[src]
type Output = u8
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, 'tmp> Parser<&'a [u8]> for &'tmp [u8]
[src]
type Output = &'a [u8]
type Error = Error<'tmp>
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a> Parser<&'a str> for char
[src]
type Output = char
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, 'tmp> Parser<&'a str> for &'tmp str
[src]
type Output = &'a str
type Error = Error<'tmp>
pub fn parse(
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
impl<A, Input> Parser<Input> for (A,) where
A: Parser<Input>,
Input: Copy,
[src]
A: Parser<Input>,
Input: Copy,
type Output = (A::Output,)
type Error = A::Error
pub 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>
impl<A, B, Input> Parser<Input> for (A, B) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output)
type Error = A::Error
pub 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>
impl<A, B, C, Input> Parser<Input> for (A, B, C) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output)
type Error = A::Error
pub 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>
impl<A, B, C, D, Input> Parser<Input> for (A, B, C, D) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output, D::Output)
type Error = A::Error
pub 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>
impl<A, B, C, D, E, Input> Parser<Input> for (A, B, C, D, E) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output, D::Output, E::Output)
type Error = A::Error
pub 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>
impl<A, B, C, D, E, F, Input> Parser<Input> for (A, B, C, D, E, F) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output)
type Error = A::Error
pub 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>
impl<A, B, C, D, E, F, G, Input> Parser<Input> for (A, B, C, D, E, F, G) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output)
type Error = A::Error
pub 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>
impl<A, B, C, D, E, F, G, H, Input> Parser<Input> for (A, B, C, D, E, F, G, H) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output)
type Error = A::Error
pub 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>
impl<A, B, C, D, E, F, G, H, I, Input> Parser<Input> for (A, B, C, D, E, F, G, H, I) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
I: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
I: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output)
type Error = A::Error
pub 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>
impl<A, B, C, D, E, F, G, H, I, J, Input> Parser<Input> for (A, B, C, D, E, F, G, H, I, J) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
I: Parser<Input, Error = A::Error>,
J: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
I: Parser<Input, Error = A::Error>,
J: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output)
type Error = A::Error
pub 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>
impl<A, B, C, D, E, F, G, H, I, J, K, Input> Parser<Input> for (A, B, C, D, E, F, G, H, I, J, K) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
I: Parser<Input, Error = A::Error>,
J: Parser<Input, Error = A::Error>,
K: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
I: Parser<Input, Error = A::Error>,
J: Parser<Input, Error = A::Error>,
K: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output)
type Error = A::Error
pub 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>
impl<A, B, C, D, E, F, G, H, I, J, K, L, Input> Parser<Input> for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
I: Parser<Input, Error = A::Error>,
J: Parser<Input, Error = A::Error>,
K: Parser<Input, Error = A::Error>,
L: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
C: Parser<Input, Error = A::Error>,
D: Parser<Input, Error = A::Error>,
E: Parser<Input, Error = A::Error>,
F: Parser<Input, Error = A::Error>,
G: Parser<Input, Error = A::Error>,
H: Parser<Input, Error = A::Error>,
I: Parser<Input, Error = A::Error>,
J: Parser<Input, Error = A::Error>,
K: Parser<Input, Error = A::Error>,
L: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output)
type Error = A::Error
pub 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>
Implementors
impl<'a> Parser<&'a str> for munch::str::Any
[src]
type Output = char
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a> Parser<&'a str> for munch::str::End
[src]
type Output = ()
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a> Parser<&'a str> for munch::str::Peek
[src]
type Output = char
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a> Parser<&'a [u8]> for munch::byte::Any
[src]
type Output = u8
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a> Parser<&'a [u8]> for munch::byte::End
[src]
type Output = ()
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a> Parser<&'a [u8]> for munch::byte::Peek
[src]
type Output = u8
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a> Parser<&'a [u8]> for Take
[src]
type Output = &'a [u8]
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, A, Input> Parser<Input> for ByRef<'a, A> where
A: Parser<Input>,
[src]
A: Parser<Input>,
type Output = A::Output
type Error = A::Error
pub 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>
impl<'a, F> Parser<&'a str> for munch::str::Satisfy<F> where
F: FnMut(char) -> bool,
[src]
F: FnMut(char) -> bool,
type Output = char
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, F> Parser<&'a str> for munch::str::TakeWhile1<F> where
F: FnMut(char) -> bool,
[src]
F: FnMut(char) -> bool,
type Output = &'a str
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, F> Parser<&'a str> for munch::str::TakeWhile<F> where
F: FnMut(char) -> bool,
[src]
F: FnMut(char) -> bool,
type Output = &'a str
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, F> Parser<&'a [u8]> for munch::byte::Satisfy<F> where
F: FnMut(u8) -> bool,
[src]
F: FnMut(u8) -> bool,
type Output = u8
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, F> Parser<&'a [u8]> for munch::byte::TakeWhile1<F> where
F: FnMut(u8) -> bool,
[src]
F: FnMut(u8) -> bool,
type Output = &'a [u8]
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, F> Parser<&'a [u8]> for munch::byte::TakeWhile<F> where
F: FnMut(u8) -> bool,
[src]
F: FnMut(u8) -> bool,
type Output = &'a [u8]
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, F, Input: ?Sized> Parser<&'a Input> for munch::ascii::Satisfy<F> where
F: FnMut(u8) -> bool,
Input: AsRef<[u8]>,
[src]
F: FnMut(u8) -> bool,
Input: AsRef<[u8]>,
type Output = u8
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a Input,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a Input,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, F, Input: ?Sized> Parser<&'a Input> for munch::ascii::TakeWhile1<F> where
F: FnMut(u8) -> bool,
Input: AsRef<[u8]>,
[src]
F: FnMut(u8) -> bool,
Input: AsRef<[u8]>,
type Output = &'a str
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a Input,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a Input,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, F, Input: ?Sized> Parser<&'a Input> for munch::ascii::TakeWhile<F> where
F: FnMut(u8) -> bool,
Input: AsRef<[u8]>,
[src]
F: FnMut(u8) -> bool,
Input: AsRef<[u8]>,
type Output = &'a str
type Error = Error<'static>
pub fn parse(
&mut self,
input: &'a Input,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a Input,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, P> Parser<&'a str> for munch::str::Capture<P> where
P: Parser<&'a str>,
[src]
P: Parser<&'a str>,
type Output = &'a str
type Error = P::Error
pub fn parse(
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a str,
from: usize
) -> Result<Self::Output, Self::Error>
impl<'a, P> Parser<&'a [u8]> for munch::byte::Capture<P> where
P: Parser<&'a [u8]>,
[src]
P: Parser<&'a [u8]>,
type Output = &'a [u8]
type Error = P::Error
pub fn parse(
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
[src]
&mut self,
input: &'a [u8],
from: usize
) -> Result<Self::Output, Self::Error>
impl<A, B, F, Input> Parser<Input> for Bind<A, F> where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
F: FnMut(A::Output) -> B,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
F: FnMut(A::Output) -> B,
Input: Copy,
type Output = B::Output
type Error = A::Error
pub 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>
impl<A, B, Input> Parser<Input> for And<A, B> where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = (A::Output, B::Output)
type Error = A::Error
pub 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>
impl<A, B, Input> Parser<Input> for AndSkip<A, B> where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = A::Output
type Error = A::Error
pub 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>
impl<A, B, Input> Parser<Input> for Or<A, B> where
A: Parser<Input>,
B: Parser<Input, Output = A::Output, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Output = A::Output, Error = A::Error>,
Input: Copy,
type Output = A::Output
type Error = A::Error
pub 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>
impl<A, B, Input> Parser<Input> for SkipAnd<A, B> where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
Input: Copy,
type Output = B::Output
type Error = A::Error
pub 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>
impl<A, B, R, Init, First, Rest, Input, Output> Parser<Input> for JoinFold<A, B, R, Init, First, Rest> where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
R: Range,
Init: FnMut() -> Output,
First: FnMut(Output, A::Output) -> Output,
Rest: FnMut(Output, B::Output, A::Output) -> Output,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
R: Range,
Init: FnMut() -> Output,
First: FnMut(Output, A::Output) -> Output,
Rest: FnMut(Output, B::Output, A::Output) -> Output,
Input: Copy,
type Output = Output
type Error = A::Error
pub 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>
impl<A, B, R, Input> Parser<Input> for Join<A, B, R> where
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
R: Range,
Input: Copy,
[src]
A: Parser<Input>,
B: Parser<Input, Error = A::Error>,
R: Range,
Input: Copy,
type Output = Vec<A::Output>
type Error = A::Error
pub 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>
impl<A, F, Input, Error> Parser<Input> for MapErr<A, F> where
A: Parser<Input>,
F: FnMut(A::Error) -> Error,
[src]
A: Parser<Input>,
F: FnMut(A::Error) -> Error,
type Output = A::Output
type Error = Error
pub 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>
impl<A, F, Input, Output> Parser<Input> for AndThen<A, F> where
A: Parser<Input>,
F: FnMut(A::Output) -> Result<Output, A::Error>,
[src]
A: Parser<Input>,
F: FnMut(A::Output) -> Result<Output, A::Error>,
type Output = Output
type Error = A::Error
pub 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>
impl<A, F, Input, Output> Parser<Input> for Map<A, F> where
A: Parser<Input>,
F: FnMut(A::Output) -> Output,
[src]
A: Parser<Input>,
F: FnMut(A::Output) -> Output,
type Output = Output
type Error = A::Error
pub 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>
impl<A, Input> Parser<Input> for Optional<A> where
A: Parser<Input>,
[src]
A: Parser<Input>,
type Output = Option<A::Output>
type Error = A::Error
pub 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>
impl<A, Input> Parser<Input> for P<A> where
A: Parser<Input>,
[src]
A: Parser<Input>,
type Output = A::Output
type Error = A::Error
pub 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>
impl<A, Input> Parser<Input> for Try<A> where
A: Parser<Input>,
[src]
A: Parser<Input>,
type Output = A::Output
type Error = A::Error
pub 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>
impl<A, R, Acc, F, Input, Output> Parser<Input> for Fold<A, R, Acc, F> where
A: Parser<Input>,
R: Range,
Acc: FnMut() -> Output,
F: FnMut(Output, A::Output) -> Output,
Input: Copy,
[src]
A: Parser<Input>,
R: Range,
Acc: FnMut() -> Output,
F: FnMut(Output, A::Output) -> Output,
Input: Copy,
type Output = Output
type Error = A::Error
pub 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>
impl<A, R, C, Input> Parser<Input> for Collect<A, R, C> where
A: Parser<Input>,
R: Range,
C: Default + Extend<A::Output>,
Input: Copy,
[src]
A: Parser<Input>,
R: Range,
C: Default + Extend<A::Output>,
Input: Copy,
type Output = C
type Error = A::Error
pub 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>
impl<A, R, Input> Parser<Input> for Repeat<A, R> where
A: Parser<Input>,
R: Range,
Input: Copy,
[src]
A: Parser<Input>,
R: Range,
Input: Copy,
type Output = Vec<A::Output>
type Error = A::Error
pub 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>
impl<F, A, Input, Output, Error> Parser<Input> for Pack<F, A> where
F: FnMut(Input, usize, &A) -> Result<Output, Error>,
[src]
F: FnMut(Input, usize, &A) -> Result<Output, Error>,
type Output = Output
type Error = Error
pub 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>
impl<F, E, Input, Error> Parser<Input> for Guard<F, E> where
F: FnMut() -> bool,
E: FnMut() -> Error,
[src]
F: FnMut() -> bool,
E: FnMut() -> Error,
type Output = ()
type Error = Error
pub 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>
impl<F, E, Input, Output> Parser<Input> for Succeed<F, E> where
F: FnMut() -> Output,
[src]
F: FnMut() -> Output,
type Output = Output
type Error = E
pub 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>
impl<F, Input, Error> Parser<Input> for Fail<F> where
F: FnMut() -> Error,
[src]
F: FnMut() -> Error,
type Output = ()
type Error = Error
pub 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>
impl<F, Input, Output, Error> Parser<Input> for F where
F: FnMut(Input, usize) -> Result<Output, Error>,
[src]
F: FnMut(Input, usize) -> Result<Output, Error>,