[][src]Struct comb::adapters::Many

pub struct Many<A: Scanner>(_, _, _);

Trait Implementations

impl<A: Scanner> Scanner for Many<A>[src]

type Input = A::Input

type Output = Vec<A::Output>

fn map<T, F>(self, f: F) -> Map<T, Self, F> where
    Self: Sized,
    F: Fn(Self::Output) -> T, 
[src]

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]

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]

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]

Skips the next element if it matches the type

fn optional(self) -> Optional<Self> where
    Self: Sized
[src]

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]

When a successful production has happened, run a function producing a new sequence

fn many(self) -> Many<Self> where
    Self: Sized
[src]

Repeat the previous combinator until an error is produced

fn many1(self) -> Many<Self> where
    Self: Sized
[src]

Repeat the previous combinator at least once until an error is produced

fn many_n(self, n: usize) -> Many<Self> where
    Self: Sized
[src]

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]

Chains two combinators together

fn value<T: Clone>(self, x: T) -> With<Self, Value<T, Self::Input>> where
    Self: Sized
[src]

Produces a value from this sequence

fn message(self, msg: Expected<Self::Input>) -> Message<Self> where
    Self: Sized,
    Self::Input: Clone
[src]

Produces an error message at this point in the sequence

fn attempt(self) -> Attempt<Self> where
    Self: Sized
[src]

Try to do the combinator, otherwise rollback to the last successful one

impl<A: Clone + Scanner> Clone for Many<A>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<A: Debug + Scanner> Debug for Many<A>[src]

Auto Trait Implementations

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

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

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]