Struct parsell::impls::StarParser [] [src]

pub struct StarParser<P, F>(_, _);

Methods

impl<P, F> StarParser<P, F>
[src]

fn new(parser: P, factory: F) -> Self

Trait Implementations

impl<P: Debug, F: Debug> Debug for StarParser<P, F>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<P, F> Copy for StarParser<P, F> where P: Copy, F: Copy
[src]

impl<P, F> Clone for StarParser<P, F> where P: Clone, F: Copy
[src]

fn clone(&self) -> Self

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<P, F> Parser for StarParser<P, F>
[src]

fn or_else<P>(self, other: P) -> OrElseParser<Self, P> where Self: Sized

Choice between parsers

fn and_then<P>(self, other: P) -> AndThenParser<Self, P> where Self: Sized

Sequencing with a committed parser

fn try_and_then<P>(self, other: P) -> MapParser<AndThenParser<Self, P>, TryZip> where Self: Sized

Sequencing with a committed parser (bubble any errors from this parser).

fn and_then_try<P>(self, other: P) -> MapParser<AndThenParser<Self, P>, ZipTry> where Self: Sized

Sequencing with a committed parser (bubble any errors from that parser).

fn try_and_then_try<P>(self, other: P) -> MapParser<AndThenParser<Self, P>, TryZipTry> where Self: Sized

Sequencing with a committed parser (bubble any errors from either parser).

fn plus<F>(self, factory: F) -> PlusParser<Self, F> where Self: Sized

Iterate one or more times (returns an uncommitted parser).

fn star<F>(self, factory: F) -> StarParser<Self, F> where Self: Sized

Iterate zero or more times (returns a committed parser).

fn map<F>(self, f: F) -> MapParser<Self, F> where Self: Sized

Apply a function to the result

fn map2<F>(self, f: F) -> MapParser<Self, Function2<F>> where Self: Sized

Apply a 2-arguent function to the result

fn map3<F>(self, f: F) -> MapParser<Self, Function3<F>> where Self: Sized

Apply a 3-arguent function to the result

fn map4<F>(self, f: F) -> MapParser<Self, Function4<F>> where Self: Sized

Apply a 4-arguent function to the result

fn map5<F>(self, f: F) -> MapParser<Self, Function5<F>> where Self: Sized

Apply a 5-arguent function to the result

fn try_map<F>(self, f: F) -> MapParser<Self, Try<F>> where Self: Sized

Apply a function to the result (bubble any errors).

fn try_map2<F>(self, f: F) -> MapParser<Self, Try<Function2<F>>> where Self: Sized

Apply a 2-argument function to the result (bubble any errors).

fn try_map3<F>(self, f: F) -> MapParser<Self, Try<Function3<F>>> where Self: Sized

Apply a 3-argument function to the result (bubble any errors).

fn try_map4<F>(self, f: F) -> MapParser<Self, Try<Function4<F>>> where Self: Sized

Apply a 4-argument function to the result (bubble any errors).

fn try_map5<F>(self, f: F) -> MapParser<Self, Try<Function5<F>>> where Self: Sized

Apply a 5-argument function to the result (bubble any errors).

fn pipe<P>(self, other: P) -> PipeParser<Self, P> where Self: Sized

Take the results of iterating this parser, and feed it into another parser.

fn buffer(self) -> BufferedParser<Self> where Self: Sized

A parser which produces its input. Read more

impl<P, F, S> Committed<S> for StarParser<P, F> where P: Copy + Uncommitted<S>, F: Factory, F::Output: Consumer<P::Output>
[src]

type Output = F::Output

The type of the data being produced by the parser.

type State = StarStatefulParser<P, P::State, F::Output>

The type of the parser state.

fn init(&self) -> Self::State

Create a stateful parser by initializing a stateless parser.

fn iter(self, data: S) -> IterParser<Self, Self::State, S> where Self: Sized + Copy

Build an iterator from a parser and some data.

fn init_parse(&self, data: S) -> ParseResult<Self::State, S> where Self: Sized

Short hand for calling init then parse.

fn init_done(&self) -> Self::Output where Self: Sized

Short hand for calling init then done.