2020-06-06 09:49:27 -04:00
|
|
|
#[macro_use]
|
|
|
|
extern crate sailfish_macros;
|
|
|
|
|
|
|
|
use sailfish::TemplateOnce;
|
|
|
|
|
|
|
|
#[derive(TemplateOnce)]
|
|
|
|
#[template(path = "include.stpl")]
|
|
|
|
struct Include {
|
|
|
|
title: String,
|
2020-06-07 04:58:52 -04:00
|
|
|
name: String,
|
2020-06-06 09:49:27 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let ctx = Include {
|
|
|
|
title: "Website".to_owned(),
|
2020-06-07 04:58:52 -04:00
|
|
|
name: "Hanako".to_owned(),
|
2020-06-06 09:49:27 -04:00
|
|
|
};
|
|
|
|
println!("{}", ctx.render_once().unwrap());
|
|
|
|
}
|