Skip to main content

TemplateEngine

Trait TemplateEngine 

Source
pub trait TemplateEngine:
    Send
    + Sync
    + 'static {
    // Required method
    fn render(&self, name: &str, context: &Value) -> Result<String>;
}
Expand description

Anything that can turn a named template plus data into text

Required Methods§

Source

fn render(&self, name: &str, context: &Value) -> Result<String>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§