Trait peruse::parsers::Parser
[−]
[src]
pub trait Parser { type I: ?Sized; type O; fn parse<'a>(&self, data: &'a Self::I) -> ParseResult<&'a Self::I, Self::O>; }
A Parser is a parser that parses some elements out of the beginning of a slice and returns a parsed value along with the rest of the unparsed slice
Associated Types
Required Methods
fn parse<'a>(&self, data: &'a Self::I) -> ParseResult<&'a Self::I, Self::O>
Implementors
impl<C: ?Sized, A: Parser<I = C>, B: Parser<I = C>> Parser for ChainedParser<A, B>
impl<T: Parser> Parser for RepeatParser<T>
impl<I: ?Sized, P: Parser<I = I>, T> Parser for MapParser<I, P, T>
impl<I: ?Sized, O, S: Parser<I = I, O = O>, T: Parser<I = I, O = O>> Parser for OrParser<S, T>
impl<P: Parser> Parser for OptionParser<P>
impl<I: ?Sized, O, F> Parser for RecursiveParser<I, O, F> where
F: Fn() -> Box<Parser<I = I, O = O>>,impl<I: ?Sized, A: Parser<I = I>, B: Parser<I = I>> Parser for RepSepParser<A, B>
impl<T: Parser> Parser for OneOfParser<T>
impl<I: ?Sized, O> Parser for BoxedParser<I, O>
impl<T: Eq + Clone> Parser for LiteralParser<T>
impl<T: Clone, U> Parser for MatchParser<T, U>
impl<T: Clone> Parser for RegexLiteralParser<T>
impl<T, F: Fn(Captures) -> T> Parser for RegexCapturesParser<T, F>