1 2 3 4 5 6 7 8 9 10 11 12 13
use askama::Template; #[derive(Template)] #[template( source = r#"{% for v in values %}{{ loop.cycle("r", "g", "b") }}{{ v }},{% endfor %}"#, ext = "txt" )] struct ForCycle<'a> { values: &'a [u8], } fn main() { }