Struct fv_template::rt::Template
source · pub struct Template<'a> { /* private fields */ }Expand description
A runtime field-value template.
Implementations§
source§impl<'a> Template<'a>
impl<'a> Template<'a>
sourcepub fn render<'brw>(
&'brw self,
ctx: Context<impl Fn(&mut Formatter<'_>, &str) -> Option<Result> + 'brw, impl Fn(&mut Formatter<'_>, &str) -> Result + 'brw>
) -> impl Display + 'brw
pub fn render<'brw>( &'brw self, ctx: Context<impl Fn(&mut Formatter<'_>, &str) -> Option<Result> + 'brw, impl Fn(&mut Formatter<'_>, &str) -> Result + 'brw> ) -> impl Display + 'brw
Render the template using the given context.
The context helps the template find replacement values and determines how to render them if they’re missing. An empty context can be used to render out the template with just its holes.