pub fn resolve(
text: &str,
slots: &[InterpolationSlot],
scope: &Scope<'_>,
) -> StringExpand description
Replace every {...} token in text with what its scope holds.
slots is the placeholder catalog the parser recorded on the element the
string came from, which is what tells a fragment parameter apart from a
global signal of the same name.
The rules:
InterpolationSlot::Row- the iteration record’s field. A field the record does not have resolves empty and is reported throughScope::missing_row_field. With no row scope the placeholder is left standing for the<for>walk that has one.InterpolationSlot::RowIndex- the iteration index, or left standing outside a row scope.InterpolationSlot::Arg- the instantiating argument, else empty. AGlobalnaming a declared parameter resolves the same way, which is how an argument shadows a global signal of that name.InterpolationSlot::Global- the global signal, or the iteration record’s field of that name when no signal is set, which is what makes the bare{field}spelling work inside a<for>body.InterpolationSlot::SelfField/InterpolationSlot::ParentField- empty. Per-entity properties have no consumer yet.