pub fn template<T: Into<Value>>(
template_str: &str,
context: T,
) -> Result<String, TemplateError>Expand description
Provides simple basic templating given just a template sting and context.
ยงExample
let output = gtmpl::template("Finally! Some {{ . }} for Rust", "gtmpl");
assert_eq!(&output.unwrap(), "Finally! Some gtmpl for Rust");