Crate go_template

Source
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§

error
funcs
Builtin functions.

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§

FuncError
Value
Represents a gtmpl value.

Functions§

from_value
FromValue wrapped in a macro (required for gtmpl_fn! macro).
template
Provides simple basic templating given just a template sting and context.

Type Aliases§

Func
Function type supported by gtmpl_value.