Struct handlebars::Template [] [src]

pub struct Template {
    pub name: Option<String>,
    pub elements: Vec<TemplateElement>,
}

Fields

name: Option<String> elements: Vec<TemplateElement>

Methods

impl Template
[src]

fn new() -> Template

fn compile<S: AsRef<str>>(source: S) -> Result<TemplateTemplateError>

fn compile_with_name<S: AsRef<str>>(source: S, name: String) -> Result<TemplateTemplateError>

Trait Implementations

impl Debug for Template
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

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 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 ToString for Template
[src]

fn to_string(&self) -> String

Converts the given value to a String. Read more

impl Renderable for Template
[src]

fn render(&self, ctx: &Context, registry: &Registry, rc: &mut RenderContext) -> Result<()RenderError>