Replies: 1 comment 2 replies
-
Having async methods would mean that the entire render code path would have to become async. I don't think that's particularly appropriate for how the engine works. What I would do is just to call |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://docs.rs/minijinja/latest/minijinja/value/trait.Object.html
Is it okay to add a
async
version forcall/call_method
inObject
trait ?I understood that it might be difficult to add it because of the lifetime issue, but there are some cases where we have to query from database inside call/call_method to proceed
Proposal
By supporting
async
above, it'd be more extensive and natural for minijinja to interact with databasePossible workaround
A possible workaround is to use undeclared_variables to query before calling
render
but that required extra complexity to parse those variablesBeta Was this translation helpful? Give feedback.
All reactions