Skip to main content

ParserExtension

Trait ParserExtension 

Source
pub trait ParserExtension {
    // Required method
    fn apply(self, parser: &mut Parser);

    // Provided method
    fn and(
        self,
        other: impl ParserExtension,
    ) -> ChainedParserExtension<Self, impl ParserExtension>
       where Self: Sized { ... }
}
Expand description

A trait for extending the parser with custom behavior.

Required Methods§

Source

fn apply(self, parser: &mut Parser)

Applies the extension to the given parser.

Provided Methods§

Source

fn and( self, other: impl ParserExtension, ) -> ChainedParserExtension<Self, impl ParserExtension>
where Self: Sized,

Chains this extension with another extension.

Implementors§