tera
tera copied to clipboard
any way to pass context as parameters?
I'm using Rocket and one issue I've noticed with Tera is that I need to make a BTreeMap or HashMap or similar to pass variables. This is a problem because I have mismatched types in that hashmap.
I've tried using Box as per https://www.simonewebdesign.it/rust-hashmap-insert-values-multiple-types/, but that doesn't seem to be serialisable. I also don't really understand emums. Can I pass the variables as parameters? Thanks!
The context takes anything that impl Serialize.