mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-01 15:00:57 +00:00
32 lines
734 B
Rust
32 lines
734 B
Rust
use rinja::Template;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "{% for _ in 1..=10 %}{% end %}", ext = "txt")]
|
|
struct For;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "{% macro test() %}{% end %}", ext = "txt")]
|
|
struct Macro;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "{% filter upper %}{% end %}", ext = "txt")]
|
|
struct Filter;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "{% match () %}{% when () %}{% end %}", ext = "txt")]
|
|
struct Match;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "{% block body %}{% end %}", ext = "txt")]
|
|
struct Block;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "{% if true %}{% end %}", ext = "txt")]
|
|
struct If;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = "{% if true %}{% endfor %}", ext = "txt")]
|
|
struct IfFor;
|
|
|
|
fn main() {}
|