pub trait Render {
type Output;
// Required method
fn render(
&self,
tree: &SyntaxTree<'_>,
page_info: &PageInfo<'_>,
settings: &WikitextSettings,
) -> Self::Output;
}
Expand description
Abstract trait for any ftml renderer.
Any structure implementing this trait represents a renderer, with whatever state it needs to perform a rendering of the inputted abstract syntax tree.
Required Associated Types§
Required Methods§
Sourcefn render(
&self,
tree: &SyntaxTree<'_>,
page_info: &PageInfo<'_>,
settings: &WikitextSettings,
) -> Self::Output
fn render( &self, tree: &SyntaxTree<'_>, page_info: &PageInfo<'_>, settings: &WikitextSettings, ) -> Self::Output
Render an abstract syntax tree into its output type.
This is the main method of the trait, causing this renderer instance to perform whatever operations it requires to produce the output string.