pub trait GrammarRenderer {
// Required methods
fn codec_symbol(&self) -> Symbol;
fn dialect(&self) -> GrammarDialect;
fn render(
&self,
graph: &GrammarGraph,
position: GrammarPosition,
) -> Result<String>;
}Expand description
Renders a neutral GrammarGraph into one concrete codec grammar surface.
Required Methods§
Sourcefn codec_symbol(&self) -> Symbol
fn codec_symbol(&self) -> Symbol
Codec symbol this renderer targets.
Sourcefn dialect(&self) -> GrammarDialect
fn dialect(&self) -> GrammarDialect
Concrete grammar dialect this renderer emits.
Sourcefn render(
&self,
graph: &GrammarGraph,
position: GrammarPosition,
) -> Result<String>
fn render( &self, graph: &GrammarGraph, position: GrammarPosition, ) -> Result<String>
Renders graph for this codec at position.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".