Trait Renderable

Source
pub trait Renderable:
    Send
    + Sync
    + Debug {
    // Required method
    fn render_to(
        &self,
        writer: &mut dyn Write,
        context: &mut Context<'_>,
    ) -> Result<()>;

    // Provided method
    fn render(&self, context: &mut Context<'_>) -> Result<String> { ... }
}
Expand description

Any object (tag/block) that can be rendered by liquid must implement this trait.

Required Methods§

Source

fn render_to( &self, writer: &mut dyn Write, context: &mut Context<'_>, ) -> Result<()>

Renders the Renderable instance given a Liquid context.

Provided Methods§

Source

fn render(&self, context: &mut Context<'_>) -> Result<String>

Renders the Renderable instance given a Liquid context.

Implementors§