2024-03-11 17:33:11 -04:00
|
|
|
use sailfish::RenderOnce;
|
|
|
|
use sailfish_macros::RenderOnce;
|
2020-06-11 02:33:13 -04:00
|
|
|
|
2024-03-11 17:33:11 -04:00
|
|
|
#[derive(RenderOnce)]
|
|
|
|
#[template(path = "foo.stpl", escape = true)]
|
2020-06-11 02:33:13 -04:00
|
|
|
#[template(escape = false)]
|
|
|
|
struct InvalidOptionValue {
|
2024-03-11 17:33:11 -04:00
|
|
|
name: String,
|
2020-06-11 02:33:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2024-03-11 17:33:11 -04:00
|
|
|
println!(
|
|
|
|
"{}",
|
|
|
|
InvalidOptionValue {
|
|
|
|
name: "Hanako".to_owned()
|
|
|
|
}
|
|
|
|
.render_once()
|
|
|
|
.unwrap()
|
|
|
|
);
|
2020-06-11 02:33:13 -04:00
|
|
|
}
|