handlebars

Trait Renderable

Source
pub trait Renderable {
    // Required method
    fn render<'reg: 'rc, 'rc>(
        &'rc self,
        registry: &'reg Registry<'reg>,
        context: &'rc Context,
        rc: &mut RenderContext<'reg, 'rc>,
        out: &mut dyn Output,
    ) -> Result<(), RenderError>;

    // Provided method
    fn renders<'reg: 'rc, 'rc>(
        &'rc self,
        registry: &'reg Registry<'reg>,
        ctx: &'rc Context,
        rc: &mut RenderContext<'reg, 'rc>,
    ) -> Result<String, RenderError> { ... }
}
Expand description

Render trait

Required Methods§

Source

fn render<'reg: 'rc, 'rc>( &'rc self, registry: &'reg Registry<'reg>, context: &'rc Context, rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output, ) -> Result<(), RenderError>

render into RenderContext’s writer

Provided Methods§

Source

fn renders<'reg: 'rc, 'rc>( &'rc self, registry: &'reg Registry<'reg>, ctx: &'rc Context, rc: &mut RenderContext<'reg, 'rc>, ) -> Result<String, RenderError>

render into string

Implementors§