pub trait TemplateRenderer {
// Required methods
fn render_str(&self, template: &str, context: &Value) -> Result<String>;
fn render_value(&self, value: &Value, context: &Value) -> Result<Value>;
}Expand description
Trait abstracting template rendering so protocol crates can render strings and JSON values without depending on a specific engine.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".