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