Struct nickel::template_cache::TemplateCache
[−]
[src]
pub struct TemplateCache { /* fields omitted */ }
Cache of compiled mustache templates
Methods
impl TemplateCache
[src]
fn with_policy(policy: ReloadPolicy) -> TemplateCache
[src]
Create a TemplateCache with the specified reload policy
fn clear(&self)
[src]
Remove all cache entries
fn reload_template<P>(&self, path: P) -> Result<(), Error> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Force a reload of a template into the cache
fn render<P, W, D>(
&self,
path: P,
writer: &mut W,
data: &D
) -> Result<(), Error> where
P: AsRef<Path>,
W: Write,
D: Encodable,
[src]
&self,
path: P,
writer: &mut W,
data: &D
) -> Result<(), Error> where
P: AsRef<Path>,
W: Write,
D: Encodable,
Render the template at path
to writer
with
data
. Templates will be reloaded if necessary according to
the reload policy.