Function hairy::hairy_eval_html
source · [−]pub fn hairy_eval_html(
template_bytecode: BytecodeRef<'_>,
value: ValueRef<'_>
) -> Result<Vec<u8>, String>
Expand description
The ‘easy’ interface 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.
Another easy function is hairy_eval_html_custom
to expose custom functions (like translation
functions).