Trait Render

Source
pub trait Render {
    // Required method
    fn render<W: Write>(&self, template: &str, writer: &mut W) -> Result<()>;
}
Expand description

Defines a renderable trait, so that all of our data is renderable

Required Methods§

Source

fn render<W: Write>(&self, template: &str, writer: &mut W) -> Result<()>

render function on a renderable returns a reader

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.

Implementations on Foreign Types§

Source§

impl Render for Json

Implement the renderable trait on the JSON type

Source§

fn render<W: Write>(&self, template: &str, writer: &mut W) -> Result<()>

Source§

impl Render for dyn ToString

Source§

fn render<W: Write>(&self, template: &str, writer: &mut W) -> Result<()>

Implementors§

Source§

impl<'a> Render for HashBuilder<'a>

Implement the renderable trait on the HashBuilder type