pub trait Template: Send + Sync {
// Required method
fn render(
&self,
data: &Value,
locale: &str,
) -> Result<Rendered, TemplateError>;
}Expand description
One template. data is the caller’s JSON payload; locale is the
requested locale tag (en, de, …) used by the implementation for
its own variants.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".