-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streamable templates #953
Comments
Does https://docs.rs/tera/latest/tera/struct.Tera.html#method.render_to not work for you? |
Ah that solves the second part of my problem, but is there a way to pass variables of type iterator to the template's context? Like what happens here |
No, not currently. It could maybe be added to v2 (https://github.com/Keats/tera2) but that would be a significant amount of work that I wouldn't have time to do myself |
Ah okay, understandable, thanks for letting me know |
I found this issue: #211 but it has been closed for the last 5 years without update.
So I wondered whether this is something that's still being considered. I think it makes a lot of sense to support streaming, both for better user experience in for example webserver responses, but most of all as it reduces RAM usage.
To be more precise: with streaming I mean that the renderer can take an iterator as input and loop over all items of the input to generate the template. The output of the renderer is then not a string, but something that implements the
Write
trait.minijinja does support streaming for example, but I would prefer not to use minijinja for other reasons.
The text was updated successfully, but these errors were encountered: