[−][src]Trait comb::Scanner
This trait is the core of the combinatorial sequencing
The scan method must be implemented, it takes a Stream and produces a Result of Self::Output from the Self::Input
Input is the input type
Output is the production type
Associated Types
Loading content...Required methods
Loading content...Provided methods
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
Self: Sized,
F: Fn(Self::Output) -> T,
Maps a function over the sequence
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
Produces an or
squence with the current and next combinator
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
Self: Sized,
T: Scanner<Input = Self::Input>,
Produces an and
sequence with the current and next combinator
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
Self: Sized,
T: Scanner<Input = Self::Input>,
Skips the next element if it matches the type
fn optional(self) -> Optional<Self> where
Self: Sized,
Self: Sized,
Produces a sequence where this element is optional
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
When a successful production has happened, run a function producing a new sequence
fn many(self) -> Many<Self> where
Self: Sized,
Self: Sized,
Repeat the previous combinator until an error is produced
fn many1(self) -> Many<Self> where
Self: Sized,
Self: Sized,
Repeat the previous combinator at least once until an error is produced
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
Self: Sized,
Repeat the previous combinator at least n
times until an error is produced
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
Self: Sized,
T: Scanner<Input = Self::Input>,
Chains two combinators together
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
Self: Sized,
Produces a value from this sequence
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
Self: Sized,
Self::Input: Clone,
Produces an error message at this point in the sequence
fn attempt(self) -> Attempt<Self> where
Self: Sized,
Self: Sized,
Try to do the combinator, otherwise rollback to the last successful one
Implementations on Foreign Types
impl<A: Scanner> Scanner for Box<A>
[src]
type Input = A::Input
type Output = A::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A: Scanner, '_> Scanner for &'_ A
[src]
type Input = A::Input
type Output = A::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A: Scanner, '_> Scanner for &'_ mut A
[src]
type Input = A::Input
type Output = A::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
Implementors
impl<A, B> Scanner for And<A, B> where
A: Scanner,
B: Scanner<Input = A::Input>,
[src]
A: Scanner,
B: Scanner<Input = A::Input>,
type Input = A::Input
type Output = (A::Output, B::Output)
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A, B> Scanner for Or<A, B> where
A: Scanner,
B: Scanner<Input = A::Input, Output = A::Output>,
[src]
A: Scanner,
B: Scanner<Input = A::Input, Output = A::Output>,
type Input = A::Input
type Output = B::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A, B> Scanner for Skip<A, B> where
A: Scanner,
B: Scanner<Input = A::Input>,
[src]
A: Scanner,
B: Scanner<Input = A::Input>,
type Input = A::Input
type Output = A::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A, B> Scanner for With<A, B> where
A: Scanner,
B: Scanner<Input = A::Input>,
[src]
A: Scanner,
B: Scanner<Input = A::Input>,
type Input = A::Input
type Output = B::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A, F, B> Scanner for Then<A, F, B> where
A: Scanner,
F: Fn(A::Output) -> B,
B: Scanner<Input = A::Input>,
[src]
A: Scanner,
F: Fn(A::Output) -> B,
B: Scanner<Input = A::Input>,
type Input = A::Input
type Output = B::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A: Scanner> Scanner for Attempt<A>
[src]
type Input = A::Input
type Output = A::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A: Scanner> Scanner for Many<A>
[src]
type Input = A::Input
type Output = Vec<A::Output>
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A: Scanner> Scanner for Message<A> where
A::Input: Clone,
[src]
A::Input: Clone,
type Input = A::Input
type Output = A::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A: Scanner> Scanner for Optional<A>
[src]
type Input = A::Input
type Output = Option<A::Output>
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A: Clone + PartialEq> Scanner for Token<A>
[src]
type Input = A
type Output = A
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A: Clone + PartialEq> Scanner for Tokens<A>
[src]
type Input = A
type Output = Vec<A>
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<A: Clone, B> Scanner for Fail<A, B>
[src]
type Input = A
type Output = B
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<F, A, B> Scanner for ScanWith<F, A, B> where
F: Fn(&mut Stream<A>) -> Result<B, A>,
[src]
F: Fn(&mut Stream<A>) -> Result<B, A>,
type Input = A
type Output = B
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<L, R> Scanner for Either<L, R> where
L: Scanner,
R: Scanner<Input = L::Input, Output = L::Output>,
[src]
L: Scanner,
R: Scanner<Input = L::Input, Output = L::Output>,
type Input = L::Input
type Output = L::Output
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<O, T, F> Scanner for Map<O, T, F> where
T: Scanner,
F: Fn(T::Output) -> O,
[src]
T: Scanner,
F: Fn(T::Output) -> O,
type Input = T::Input
type Output = O
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<T, F> Scanner for Expect<T, F> where
T: Clone,
F: Fn(&T) -> bool,
[src]
T: Clone,
F: Fn(&T) -> bool,
type Input = T
type Output = T
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<T: Clone> Scanner for Any<T>
[src]
type Input = T
type Output = T
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<T: Clone> Scanner for End<T>
[src]
type Input = T
type Output = ()
fn scan(
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
[src]
&self,
stream: &mut Stream<Self::Input>
) -> Result<Self::Output, Self::Input>
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
impl<T: Clone, I> Scanner for Value<T, I>
[src]
type Input = I
type Output = T
fn scan(&self, _: &mut Stream<Self::Input>) -> Result<Self::Output, Self::Input>
[src]
fn map<T, F>(self, f: F) -> Map<T, Self, F> where
Self: Sized,
F: Fn(Self::Output) -> T,
[src]
Self: Sized,
F: Fn(Self::Output) -> T,
fn or<T>(self, x: T) -> Or<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input, Output = Self::Output>,
fn and<T>(self, x: T) -> And<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn skip<T>(self, x: T) -> Skip<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
Self: Sized,
fn then<B, F>(self, f: F) -> Then<Self, F, B> where
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
[src]
Self: Sized,
F: Fn(Self::Output) -> B,
B: Scanner<Input = Self::Input>,
fn many(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn many_n(self, n: usize) -> Many<Self> where
Self: Sized,
[src]
Self: Sized,
fn with<T>(self, x: T) -> With<Self, T> where
Self: Sized,
T: Scanner<Input = Self::Input>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
Self: Sized,
[src]
Self: Sized,
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,