pub trait TemplateEngine: Sized {
type Id: Debug;
type LazyBodyTemplate: PathRebaseable + Debug + Send + Serialize + for<'a> Deserialize<'a>;
// Required methods
fn load_body_template(
&mut self,
tmpl: Self::LazyBodyTemplate,
) -> Result<BodyTemplate<Self>, Error>;
fn load_subject_template(
&mut self,
template_string: String,
) -> Result<Self::Id, Error>;
}Expand description
Trait used to bind/implement template engines.
Required Associated Types§
type Id: Debug
type LazyBodyTemplate: PathRebaseable + Debug + Send + Serialize + for<'a> Deserialize<'a>
Required Methods§
fn load_body_template( &mut self, tmpl: Self::LazyBodyTemplate, ) -> Result<BodyTemplate<Self>, Error>
fn load_subject_template( &mut self, template_string: String, ) -> Result<Self::Id, 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.