Expand description
The Golang Templating Language for Rust.
§Example
use gtmpl;
let output = gtmpl::template("Finally! Some {{ . }} for Rust", "gtmpl");
assert_eq!(&output.unwrap(), "Finally! Some gtmpl for Rust");
Re-exports§
pub use error::TemplateError;
Modules§
Macros§
- gtmpl_
fn - Help to write new functions for gtmpl.
Structs§
- Context
- A Context for the template. Passed to the template exectution.
- Template
- The main template structure.
Enums§
Functions§
- from_
value FromValue
wrapped in a macro (required forgtmpl_fn!
macro).- template
- Provides simple basic templating given just a template sting and context.
Type Aliases§
- Func
- Function type supported by
gtmpl_value
.