pub struct Handlebars { /* private fields */ }Implementations§
Source§impl Handlebars
impl Handlebars
pub fn new() -> Self
pub fn inner(&self) -> &Handlebars
Sourcepub fn inner_mut(&mut self) -> &mut Handlebars
pub fn inner_mut(&mut self) -> &mut Handlebars
Provides mutable access to the underling handlebars instance.
This can be used to e.g. add partials (in the future the template file will have a custom config section but currently it doesn’t).
Trait Implementations§
Source§impl TemplateEngine for Handlebars
impl TemplateEngine for Handlebars
type Id = String
type LazyBodyTemplate = StandardLazyBodyTemplate
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>
Source§impl<D> TemplateEngineCanHandleData<D> for Handlebarswhere
D: Serialize,
Additional trait a template engine needs to implement for the types it can process as input.
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.
Auto Trait Implementations§
impl Freeze for Handlebars
impl !RefUnwindSafe for Handlebars
impl Send for Handlebars
impl Sync for Handlebars
impl Unpin for Handlebars
impl !UnwindSafe for Handlebars
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more