Skip to main content

bind

Function bind 

Source
pub fn bind(
    document: &Value,
    data: &Value,
    options: &BindOptions,
) -> Result<Value, ComposeError>
Expand description

Binds document to data: a template’s parameters replaced and its template nodes expanded, giving a plain spec (or, for a node template, a plain node). A document without a header has only its template nodes expanded; directives and {{name}} exist only in template bodies. Without a header, template nodes or a theme, bind returns document unchanged.

§Errors

Returns where in the template or data, and why, it does not bind.