[−][src]Struct handlebars_iron::HandlebarsEngine
The handlebars template engine
Fields
sources: Vec<Box<dyn Source + Send + Sync>>registry: RwLock<Box<Handlebars>>Methods
impl HandlebarsEngine[src]
pub fn new() -> HandlebarsEngine[src]
create a handlebars template engine
pub fn from(reg: Handlebars) -> HandlebarsEngine[src]
create a handlebars template engine from existed handlebars registry
pub fn add(&mut self, source: Box<dyn Source + Send + Sync>)[src]
add a template source
pub fn reload(&self) -> Result<(), SourceError>[src]
load template from registered sources
pub fn handlebars_mut(&self) -> RwLockWriteGuard<Box<Handlebars>>[src]
access internal handlebars registry, useful to register custom helpers
Trait Implementations
impl Key for HandlebarsEngine[src]
impl AfterMiddleware for HandlebarsEngine[src]
fn after(&self, _: &mut Request, resp: Response) -> IronResult<Response>[src]
fn catch(&self, req: &mut Request, err: IronError) -> IronResult<Response>[src]
impl Plugin<Response> for HandlebarsEngine[src]
Auto Trait Implementations
impl Send for HandlebarsEngine
impl Unpin for HandlebarsEngine
impl Sync for HandlebarsEngine
impl !UnwindSafe for HandlebarsEngine
impl !RefUnwindSafe for HandlebarsEngine
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<F> AfterMiddleware for F where
F: Send + Sync + 'static + Fn(&mut Request, Response) -> Result<Response, IronError>, [src]
F: Send + Sync + 'static + Fn(&mut Request, Response) -> Result<Response, IronError>,
fn after(&self, req: &mut Request, res: Response) -> Result<Response, IronError>[src]
fn catch(&self, &mut Request, err: IronError) -> Result<Response, IronError>[src]
Respond to an error thrown by previous AfterMiddleware, the Handler, or a BeforeMiddleware. Read more
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> UnsafeAny for T where
T: Any,
T: Any,