pub trait Parser {
    type Rule: RuleType;
    type Parser: PestParser<Self::Rule>;

    fn parse<'i>(
        rule: Self::Rule,
        input_str: &'i str
    ) -> Result<Nodes<'i, Self::Rule, ()>, Error<Self::Rule>> { ... } fn parse_with_userdata<'i, D>(
        rule: Self::Rule,
        input_str: &'i str,
        user_data: D
    ) -> Result<Nodes<'i, Self::Rule, D>, Error<Self::Rule>> { ... } }
Expand description

A trait that provides methods to parse strings. Do not implement manually; instead use the parser macro provided by this crate.

Required Associated Types

Provided Methods

Parses a &str starting from rule

Parses a &str starting from rule, carrying user_data through the parser methods.

Implementors