Struct stache::Template
[−]
[src]
pub struct Template { pub tree: Statement, pub path: PathBuf, pub name: String, // some fields omitted }
Fields
tree: Statement
path: PathBuf
name: String
Methods
impl Template
[src]
fn new(base: &PathBuf, path: PathBuf, tree: Statement) -> Self
Creates a template from file name and root AST node.
The file name is used as an identifier in compiled function names to ensure uniqueness when linked with other templates. It provides a stable name to be referenced as a partial in other templates.