21 lines
372 B
Rust
21 lines
372 B
Rust
use sailfish::RenderOnce;
|
|
use sailfish_macros::RenderOnce;
|
|
|
|
#[derive(RenderOnce)]
|
|
#[template(path = "foo.stpl", escape = true)]
|
|
#[template(escape = false)]
|
|
struct InvalidOptionValue {
|
|
name: String,
|
|
}
|
|
|
|
fn main() {
|
|
println!(
|
|
"{}",
|
|
InvalidOptionValue {
|
|
name: "Hanako".to_owned()
|
|
}
|
|
.render_once()
|
|
.unwrap()
|
|
);
|
|
}
|