Struct iron_tera::TeraEngine
source · pub struct TeraEngine {
pub tera: Tera,
}
Expand description
TeraEngine holds the Tera struct so that it can be used by many handlers without explicitly passing
Fields
tera: Tera
Implementations
sourceimpl TeraEngine
impl TeraEngine
compile_templates!
is used to parse the contents of a dir for all templates.
sourcepub fn new<S: AsRef<str>>(dir: S) -> TeraEngine
pub fn new<S: AsRef<str>>(dir: S) -> TeraEngine
Take a String
and convert to a slice
Trait Implementations
sourceimpl AfterMiddleware for TeraEngine
impl AfterMiddleware for TeraEngine
The middleware implementation for TeraEngine
sourceimpl Key for TeraEngine
impl Key for TeraEngine
Auto Trait Implementations
impl !RefUnwindSafe for TeraEngine
impl Send for TeraEngine
impl Sync for TeraEngine
impl Unpin for TeraEngine
impl !UnwindSafe for TeraEngine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more