[−][src]Function gtmpl::template
pub fn template<T: Into<Value>>(
template_str: &str,
context: T
) -> Result<String, String>
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");