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§
sourcefn parser<'src>(
) -> impl Parser<'src, &'src str, T, Err<Rich<'src, char>>> + Clone
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).
sourcefn part_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
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.