Function hairy::hairy_eval_html_custom
source · [−]pub fn hairy_eval_html_custom<'b>(
template_bytecode: BytecodeRef<'b>,
value: ValueRef<'b>,
custom: &mut dyn CustomFuncs
) -> Result<Vec<u8>, String>
Expand description
The ‘easy’ interface (with custom functions) if you just want to quickly use a HTML template, with auto escaping of the
input, and returning a nicely formatted error that can be presented to the user. For more
options, see the hairy_eval
function.
To compile, use hairy_compile_html
, so the proper escaper is used.
Note that although hairy_compile_html
and hairy_eval_html
are easier to use, they are
somewhat slower. For top performance please use other functions.