#[macro_use] extern crate askama; use askama::Template; #[derive(Template)] #[template(path = "macro.html", print = "all")] struct MacroTemplate<'a> { s: &'a str, } #[test] fn test_macro() { let t = MacroTemplate { s: "foo" }; assert_eq!(t.render().unwrap(), "foo foo foo"); }