Closed duhbbx closed 3 weeks ago
I want to use tera to render a very large word, perhaps with thousands of pages, but the current implementation seems to put it in memory first.
I want to use file stream instead of write here, and then output the rendered results to the file. Is this feasible?
/// Entry point for the rendering pub fn render(&mut self, write: &mut impl Write) -> Result<()> { for node in &self.template_root.ast { self.render_node(node, write) .map_err(|e| Error::chain(self.get_error_location(), e))?; } Ok(()) }
Does https://docs.rs/tera/latest/tera/struct.Tera.html#method.render_to work for you?
Thank you very much, I'll try it later
I want to use tera to render a very large word, perhaps with thousands of pages, but the current implementation seems to put it in memory first.
I want to use file stream instead of write here, and then output the rendered results to the file. Is this feasible?