Trait mail_template::TemplateExt
source · pub trait TemplateExt<TE, D>where
TE: TemplateEngine + TemplateEngineCanHandleData<D>,{
fn render_to_mail_parts<'r>(
&self,
data: LoadedTemplateData<'r, D>,
ctx: &impl Context
) -> Result<(MailParts, Header<Subject>), Error>;
fn render<'r>(
&self,
data: LoadedTemplateData<'r, D>,
ctx: &impl Context
) -> Result<Mail, Error> { ... }
}Expand description
Automatically provides the prepare_to_render method for all Templates
This trait is implemented for all Templates/D(data) combinations where
the templates template engine can handle the given data (impl. TemplateEngineCanHandleData<D>)
This trait should not be implemented by hand.