Struct handlebars::Handlebars
[-] [+]
[src]
pub struct Handlebars { // some fields omitted }
pub struct Handlebars { // some fields omitted }
impl Registry
fn new() -> Registry
fn register_template(&mut self, name: &str, template: Template)
fn register_template_string(&mut self, name: &str, tpl_str: String) -> Result<(), TemplateError>
fn unregister_template(&mut self, name: &String)
fn register_helper(&mut self, name: &str, def: Box<HelperDef + 'static>) -> Option<Box<HelperDef + 'static>>
fn get_template(&self, name: &String) -> Option<&Template>
fn get_helper(&self, name: &String) -> Option<&Box<HelperDef + 'static>>
fn get_templates(&self) -> &HashMap<String, Template>
fn clear_templates(&mut self)
fn render<T>(&self, name: &str, ctx: &T) -> Result<String, RenderError> where T: ToJson
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
, enum
,
trait
, typedef
(or
tdef
).