pub struct TemplateEngine { /* private fields */ }Expand description
Template engine for managing and rendering templates.
Implementations§
Source§impl TemplateEngine
impl TemplateEngine
Sourcepub fn with_format(self, format: TemplateFormat) -> Self
pub fn with_format(self, format: TemplateFormat) -> Self
Set the default template format.
Sourcepub fn with_variant(self, variant: TemplateVariant) -> Self
pub fn with_variant(self, variant: TemplateVariant) -> Self
Set the default template variant.
Sourcepub fn with_custom_template(self, template: Template) -> Self
pub fn with_custom_template(self, template: Template) -> Self
Set a custom template.
Sourcepub fn with_custom_template_file(self, path: &Path) -> Result<Self>
pub fn with_custom_template_file(self, path: &Path) -> Result<Self>
Load a custom template from a file.
Trait Implementations§
Source§impl Debug for TemplateEngine
impl Debug for TemplateEngine
Auto Trait Implementations§
impl Freeze for TemplateEngine
impl RefUnwindSafe for TemplateEngine
impl Send for TemplateEngine
impl Sync for TemplateEngine
impl Unpin for TemplateEngine
impl UnwindSafe for TemplateEngine
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