Skip to main content

render_template_with_layout

Function render_template_with_layout 

Source
pub fn render_template_with_layout(
    template_json: &str,
    data_json: &str,
) -> Result<(Vec<u8>, LayoutInfo, Vec<String>), FormeError>
Expand description

Render a template with data to PDF bytes along with layout metadata and the render’s warnings.

The warnings are part of the return tuple rather than an _and_warnings variant on purpose: this function discarded them for its whole life, which made renderTemplateWithLayout report “warnings: none” on every render while its declared type promised a list. Matching render_with_layout’s shape means a caller has to name the value to drop it.