Crates.io | mhtemplate |
lib.rs | mhtemplate |
version | 1.0.0 |
source | src |
created_at | 2020-01-30 14:28:20.486351 |
updated_at | 2020-01-30 14:28:20.486351 |
description | Easy-to-use, dynamic text template library. |
homepage | |
repository | https://github.com/MHmorgan/rustmhtemplate |
max_upload_size | |
id | 203303 |
size | 81,215 |
mhtemplate is an easy-to-use, dynamic text template library.
[dependencies]
mhtemplate = "1"
extern crate mhtemplate;
use mhtemplate::{Context, TemplateFactory};
let text = include_str!("text.template");
let tmpl = TemplateFactory::new(&text).parse().unwrap();
let text = tmpl.evaluate(&mut Context::new()).unwrap();