Yet Another Simple template engine
Inspired by %nix shell and Java version from some years ago and some code influenced by other Rust templating engines.
Features:
- Default delimiters "${" and "}". Can be overridden to anything.
- Default values with :- syntax.
- Nesting of variables allowed (to 8 levels).
- Can use environment variables.
- Value lookup order: supplied HashMap, Environment, Default (if supplied).
- Plays nicely with serde HashMaps.
- Can include files (which can nest). With .inc extension only.
- Zero dependencies.
- Fast.
- Can use multi-valued variables for lists etc. (only through HashMap).
- Can check existence of a value and if true give it a default. Useful for HTML forms when variable has a particular value, and this value should be the default selected value.
Please read the API documentation https://docs.rs/stemplate/