pub struct Template { /* private fields */ }Implementations§
Source§impl Template
impl Template
pub fn new(template_dir: &str) -> Self
pub fn render(&self, template: &str, context: &Context) -> Result<String>
pub fn watch(self)
pub fn register_function<F: Function + 'static>( &mut self, name: &str, function: F, )
pub fn register_filter<F: Filter + 'static>(&mut self, name: &str, filter: F)
pub fn register_tester<T: Test + 'static>(&mut self, name: &str, tester: T)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Template
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnwindSafe for Template
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