pub struct StreamingGeneration { /* private fields */ }Expand description
Holds all the data needed to render a template to a writer. This struct is Send and can be moved into a WriterFn closure.
Implementations§
Source§impl StreamingGeneration
impl StreamingGeneration
Sourcepub fn render_to_writer<W: Write + ?Sized>(self, writer: &mut W) -> Result<()>
pub fn render_to_writer<W: Write + ?Sized>(self, writer: &mut W) -> Result<()>
Render the template to the provided writer. This creates the minijinja environment and renders in one step.
Sourcepub fn into_writer_fn(self) -> WriterFn
pub fn into_writer_fn(self) -> WriterFn
Convert this streaming generation into a WriterFn that can be passed to migration_apply.
Auto Trait Implementations§
impl Freeze for StreamingGeneration
impl !RefUnwindSafe for StreamingGeneration
impl Send for StreamingGeneration
impl Sync for StreamingGeneration
impl Unpin for StreamingGeneration
impl UnsafeUnpin for StreamingGeneration
impl !UnwindSafe for StreamingGeneration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more