pest

Trait Parser

Source
pub trait Parser<R: RuleType> {
    // Required method
    fn parse(rule: R, input: &str) -> Result<Pairs<'_, R>, Error<R>>;
}
Expand description

A trait with a single method that parses strings.

Required Methods§

Source

fn parse(rule: R, input: &str) -> Result<Pairs<'_, R>, Error<R>>

Parses a &str starting from rule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§