tera icon indicating copy to clipboard operation
tera copied to clipboard

any way to pass context as parameters?

Open TheTechRobo opened this issue 4 years ago • 1 comments

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!

TheTechRobo avatar Sep 09 '21 01:09 TheTechRobo

The context takes anything that impl Serialize.

Keats avatar Sep 09 '21 06:09 Keats