This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Description
I'd like to use Askama as follows:
#[derive(Template)]
#[derive(Serialize, Deserialize)]
pub enum QuestionData {
#[template(path = "./templates/question/editor/multiple-text.html")]
MultipleChoiceText {
numbering: Numbering,
text: Vec<String>,
},
#[template(path = "./templates/question/editor/multiple-image.html")]
MultipleChoiceImage {
numbering: Numbering,
images: Vec<i32>,
},
#[template(path = "./templates/question/editor/truefalse.html")]
TrueOrFalse,
#[template(path = "./templates/question/editor/fillblank.html")]
FillInTheBlank {
sections: Vec<String>,
starts_with_blank: bool,
},
#[template(path = "./templates/question/editor/short-answer.html")]
ShortAnswer {
answers: Vec<String>,
},
#[template(path = "./templates/question/editor/ranking-text.html")]
RankingText {
numbering: Numbering,
items: Vec<String>,
},
#[template(path = "./templates/question/editor/ranking-image.html")]
RankingImages {
numbering: Numbering,
items: Vec<i32>,
},
}
#[derive(Serialize, Deserialize)]
pub enum Numbering {
Letters,
Numbers,
Bullets,
}
Is this a possibility in the future?