pub trait SourceRenderer: Send + Sync {
// Required method
fn render(
&self,
source: &str,
) -> Result<Box<dyn Renderable + Send + Sync>, PluginError>;
}Expand description
Turns source text into a renderable: a diagram, a data format, a report.
Registered under a name with PluginRegistrar::renderer.
Required Methods§
Sourcefn render(
&self,
source: &str,
) -> Result<Box<dyn Renderable + Send + Sync>, PluginError>
fn render( &self, source: &str, ) -> Result<Box<dyn Renderable + Send + Sync>, PluginError>
Render source. Errors should say what was wrong with the input.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".