pub trait TemplateEngine {
type Body: ResBody;
type Error: Into<Error>;
// Required method
fn render<T>(
&self,
template_name: &str,
ctx: &T,
) -> Result<Self::Body, Self::Error>
where T: Serialize;
}Expand description
A trait representing template engine used in Renderer.
Required Associated Types§
Required Methods§
fn render<T>(
&self,
template_name: &str,
ctx: &T,
) -> Result<Self::Body, Self::Error>where
T: Serialize,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl TemplateEngine for Handlebars
Available on crate feature handlebars only.
impl TemplateEngine for Handlebars
Available on crate feature
handlebars only.Source§impl TemplateEngine for Tera
Available on crate feature tera only.
impl TemplateEngine for Tera
Available on crate feature
tera only.