typed-handlebars 0.4.0

Compile-time checked Handlebars templates for Rust
Documentation
1
2
3
4
5
6
7
8
9
// The template calls it `heading`; the call site still says `title`. Under the old positional API
// this compiled and silently kept working.
mod template {
    typed_handlebars::str!("page", r#"<h1>{{heading}}</h1>"#);
}

fn main() {
    let _ = template::page::builder().title("Dub").render();
}