pub trait TemplateEngineCanHandleData<D>: TemplateEngine {
// Required method
fn render<'r, 'a>(
&'r self,
id: &'r Self::Id,
data: &'r D,
additional_cids: AdditionalCIds<'r>,
) -> Result<String, Error>;
}Expand description
Additional trait a template engine needs to implement for the types it can process as input.
This could for example be implemented in a wild card impl for the template engine for
any data D which implements Serialize.
Required Methods§
fn render<'r, 'a>( &'r self, id: &'r Self::Id, data: &'r D, additional_cids: AdditionalCIds<'r>, ) -> Result<String, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<D> TemplateEngineCanHandleData<D> for Handlebarswhere
D: Serialize,
Additional trait a template engine needs to implement for the types it can process as input.
This could for example be implemented in a wild card impl for the template engine for
any data D which implements Serialize.