Trait tyche::parse::GenParser

source ·
pub trait GenParser<T> {
    // Required methods
    fn parser<'src>(
    ) -> impl Parser<'src, &'src str, T, Err<Rich<'src, char>>> + Clone;
    fn part_parser<'src>(
    ) -> impl Parser<'src, &'src str, T, Err<Rich<'src, char>>> + Clone;
}
Expand description

Trait to allow convenient access to a parser generator for any implementing type

Required Methods§

source

fn parser<'src>( ) -> impl Parser<'src, &'src str, T, Err<Rich<'src, char>>> + Clone

Generates a parser for this type that expects end of input. Requires the parse feature (enabled by default).

source

fn part_parser<'src>( ) -> impl Parser<'src, &'src str, T, Err<Rich<'src, char>>> + Clone

Generates a parser for this type that parses up to the end of valid input. Requires the parse feature (enabled by default).

Object Safety§

This trait is not object safe.

Implementors§