mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-29 22:11:17 +00:00
41 lines
638 B
Rust
41 lines
638 B
Rust
use rinja::Template;
|
|
|
|
struct X {
|
|
a: u32,
|
|
b: u32,
|
|
}
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "
|
|
{%- if let X { a, .. } = x -%}hello {{ a }}{%- endif -%}
|
|
", ext = "html")]
|
|
struct T1 {
|
|
x: X,
|
|
}
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "
|
|
{%- if let X { a, .., } = x -%}hello {{ a }}{%- endif -%}
|
|
", ext = "html")]
|
|
struct T2 {
|
|
x: X,
|
|
}
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "
|
|
{%- if let X { a .. } = x -%}hello {{ a }}{%- endif -%}
|
|
", ext = "html")]
|
|
struct T3 {
|
|
x: X,
|
|
}
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "
|
|
{%- if let X { .. } = x -%}hello {{ a }}{%- endif -%}
|
|
", ext = "html")]
|
|
struct T4 {
|
|
x: X,
|
|
}
|
|
|
|
fn main() {}
|