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 !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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more