Struct mustache::Context [] [src]

pub struct Context {
    pub template_path: PathBuf,
    pub template_extension: String,
}

Represents the shared metadata needed to compile and render a mustache template.

Fields

template_path: PathBuf template_extension: String

Methods

impl Context
[src]

fn new(path: PathBuf) -> Context

Configures a mustache context the specified path to the templates.

fn compile<IT: Iterator<Item=char>>(&self, reader: IT) -> Template

Compiles a template from a string

fn compile_path<U: AsRef<Path>>(&self, path: U) -> Result<TemplateError>

Compiles a template from a path.

Trait Implementations

impl Clone for Context
[src]

fn clone(&self) -> Context

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 Context
[src]

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

Formats the value using the given formatter.