Struct handlebars::template::Template [−][src]
pub struct Template { pub name: Option<String>, pub elements: Vec<TemplateElement>, pub mapping: Option<Vec<TemplateMapping>>, }
A handlebars template
Fields
name: Option<String>
elements: Vec<TemplateElement>
mapping: Option<Vec<TemplateMapping>>
Implementations
impl Template
[src]
impl Template
[src]pub fn new(mapping: bool) -> Template
[src]
pub fn compile<S: AsRef<str>>(source: S) -> Result<Template, TemplateError>
[src]
pub fn compile2<'a, S: AsRef<str> + 'a>(
source: S,
mapping: bool
) -> Result<Template, TemplateError>
[src]
source: S,
mapping: bool
) -> Result<Template, TemplateError>
pub fn compile_with_name<S: AsRef<str>>(
source: S,
name: String,
mapping: bool
) -> Result<Template, TemplateError>
[src]
source: S,
name: String,
mapping: bool
) -> Result<Template, TemplateError>
Trait Implementations
impl Evaluable for Template
[src]
impl Evaluable for Template
[src]fn eval<'reg: 'rc, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>
) -> Result<(), RenderError>
[src]
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>
) -> Result<(), RenderError>
impl Renderable for Template
[src]
impl Renderable for Template
[src]fn render<'reg: 'rc, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output
) -> Result<(), RenderError>
[src]
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output
) -> Result<(), RenderError>
fn renders<'reg: 'rc, 'rc>(
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>
) -> Result<String, RenderError>
[src]
&'reg self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>
) -> Result<String, RenderError>