[−][src]Struct comb::adapters::Fail
Trait Implementations
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,
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>,
[src]
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>,
[src]
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>,
[src]
Self: Sized,
T: Scanner<Input = Self::Input>,
Skips the next element if it matches the type
fn optional(self) -> Optional<Self> where
Self: Sized,
[src]
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>,
[src]
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,
[src]
Self: Sized,
Repeat the previous combinator until an error is produced
fn many1(self) -> Many<Self> where
Self: Sized,
[src]
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,
[src]
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>,
[src]
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,
[src]
Self: Sized,
Produces a value from this sequence
fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
Self: Sized,
Self::Input: Clone,
[src]
Self: Sized,
Self::Input: Clone,
Produces an error message at this point in the sequence
fn attempt(self) -> Attempt<Self> where
Self: Sized,
[src]
Self: Sized,
Try to do the combinator, otherwise rollback to the last successful one
impl<A: Clone + Clone, B: Clone> Clone for Fail<A, B>
[src]
fn clone(&self) -> Fail<A, B>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<A: Debug + Clone, B: Debug> Debug for Fail<A, B>
[src]
Auto Trait Implementations
impl<A, B> Send for Fail<A, B> where
A: Send,
B: Send,
A: Send,
B: Send,
impl<A, B> Sync for Fail<A, B> where
A: Sync,
B: Sync,
A: Sync,
B: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,