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).
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.