Trait maud::RenderOnce
[−]
[src]
pub trait RenderOnce: Sized { fn render_once(self) -> Markup { ... } fn render_once_to(self, buffer: &mut String) { ... } }
Represents a type that can be rendered as HTML, where the rendering operation consumes the value.
See the Render
documentation for advice on
how to use this trait.
Provided Methods
fn render_once(self) -> Markup
Renders self
as a block of Markup
, consuming it in the
process.
fn render_once_to(self, buffer: &mut String)
Appends a representation of self
to the given string,
consuming self
in the process.
Its default implementation just calls .render_once()
, but you
may override it with something more efficient.
Note that no further escaping is performed on data written to
the buffer. If you override this method, you must make sure that
any data written is properly escaped, whether by hand or using
the Escaper
wrapper struct.