Struct handlebars::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>>
Methods
impl Template
[src]
fn new(mapping: bool) -> Template
fn compile<S: AsRef<str>>(source: S) -> Result<Template, TemplateError>
fn compile2<S: AsRef<str>>(
source: S,
mapping: bool
) -> Result<Template, TemplateError>
source: S,
mapping: bool
) -> Result<Template, TemplateError>
fn compile_with_name<S: AsRef<str>>(
source: S,
name: String,
mapping: bool
) -> Result<Template, TemplateError>
source: S,
name: String,
mapping: bool
) -> Result<Template, TemplateError>
Trait Implementations
impl PartialEq for Template
[src]
fn eq(&self, __arg_0: &Template) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Template) -> bool
This method tests for !=
.
impl Clone for Template
[src]
fn clone(&self) -> Template
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Template
[src]
impl Renderable for Template
[src]
fn render(
&self,
registry: &Registry,
rc: &mut RenderContext
) -> Result<(), RenderError>
&self,
registry: &Registry,
rc: &mut RenderContext
) -> Result<(), RenderError>
render into RenderContext's writer
fn renders(
&self,
registry: &Registry,
rc: &mut RenderContext
) -> Result<String, RenderError>
&self,
registry: &Registry,
rc: &mut RenderContext
) -> Result<String, RenderError>
render into string
impl Evaluable for Template
[src]
fn eval(
&self,
registry: &Registry,
rc: &mut RenderContext
) -> Result<(), RenderError>
&self,
registry: &Registry,
rc: &mut RenderContext
) -> Result<(), RenderError>