pub trait Render: Sized {
// Required method
fn render_into<W: Write>(self, writer: &mut W) -> Result;
// Provided method
fn render(self) -> String { ... }
}
Expand description
Render a component
This is the underlying mechanism of the #[component]
macro
Required Methods§
Sourcefn render_into<W: Write>(self, writer: &mut W) -> Result
fn render_into<W: Write>(self, writer: &mut W) -> Result
Render the component to a writer.
Make sure you escape html correctly using the render::html_escaping
module
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.