Function rubble_templates::compile_template_from_string [−][src]
pub fn compile_template_from_string(
template: String,
variables: HashMap<String, String>,
functions: HashMap<String, Box<dyn Function>>
) -> Result<String, CompilationError>
Compiles template from String.
It creates a Template instance on the fly and then compiles it.
For some special cases consider using SimpleEvaluationEngine, TemplateCompiler or other specific Evaluator and Compiler traits implementations.
Template can look like the following: Some template {{ variable }} - or something
.
Code that will be evaluated should be put between {{
and }}
.