Struct handlebars_iron::HandlebarsEngine
[−]
[src]
pub struct HandlebarsEngine { pub sources: Vec<Box<Source + Send + Sync>>, pub registry: RwLock<Box<Handlebars>>, }
Fields
sources: Vec<Box<Source + Send + Sync>>
registry: RwLock<Box<Handlebars>>
Methods
impl HandlebarsEngine
[src]
fn new() -> HandlebarsEngine
fn from(reg: Handlebars) -> HandlebarsEngine
fn add(&mut self, source: Box<Source + Send + Sync>)
fn reload(&self) -> Result<(), SourceError>
Trait Implementations
impl Key for HandlebarsEngine
[src]
impl PluginFor<Response> for HandlebarsEngine
[src]
type Error = ()
The error type associated with this plugin.
fn eval(resp: &mut Response) -> Result<Template, ()>
Create the plugin from an instance of the extended type. Read more
impl AfterMiddleware for HandlebarsEngine
[src]
fn after(&self, _: &mut Request, resp: Response) -> IronResult<Response>
Do whatever post-processing this middleware should do.
fn catch(&self, req: &mut Request, err: IronError) -> IronResult<Response>
Respond to an error thrown by previous AfterMiddleware
, the Handler
, or a BeforeMiddleware
. Read more