pub trait Symbol<'input, G> {
type Output;
// Required methods
fn pretty_print(&self) -> String;
fn parse(
&self,
grammar: &mut G,
input: Input<'input>,
) -> ParseResult<'input, Self::Output>;
// Provided methods
fn parse_complete(
&self,
grammar: &mut G,
text: &'input str,
) -> Result<Self::Output, Error<'input>> { ... }
fn parse_prefix(
&self,
grammar: &mut G,
text: &'input str,
) -> ParseResult<'input, Self::Output> { ... }
}Required Associated Types§
Required Methods§
fn pretty_print(&self) -> String
fn parse( &self, grammar: &mut G, input: Input<'input>, ) -> ParseResult<'input, Self::Output>
Provided Methods§
fn parse_complete( &self, grammar: &mut G, text: &'input str, ) -> Result<Self::Output, Error<'input>>
fn parse_prefix( &self, grammar: &mut G, text: &'input str, ) -> ParseResult<'input, Self::Output>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".