pub trait Renderable {
// Required method
fn render<'reg, 'rc>(
&'rc self,
registry: &'reg Registry<'reg>,
context: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output,
) -> Result<(), RenderError>
where 'reg: 'rc;
// Provided method
fn renders<'reg, 'rc>(
&'rc self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
) -> Result<String, RenderError>
where 'reg: 'rc { ... }
}
Expand description
Render trait
Required Methods§
Sourcefn render<'reg, 'rc>(
&'rc self,
registry: &'reg Registry<'reg>,
context: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output,
) -> Result<(), RenderError>where
'reg: 'rc,
fn render<'reg, 'rc>(
&'rc self,
registry: &'reg Registry<'reg>,
context: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output,
) -> Result<(), RenderError>where
'reg: 'rc,
render into RenderContext’s writer
Provided Methods§
Sourcefn renders<'reg, 'rc>(
&'rc self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
) -> Result<String, RenderError>where
'reg: 'rc,
fn renders<'reg, 'rc>(
&'rc self,
registry: &'reg Registry<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
) -> Result<String, RenderError>where
'reg: 'rc,
render into string