Function gtmpl::template [−][src]
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");