Skip to main content

interpolate_via_kernel

Function interpolate_via_kernel 

Source
pub fn interpolate_via_kernel(
    text: &str,
    kernel: &dyn Lookup,
) -> Result<String, EmbeddingError>
Expand description

Interpolate {name} placeholders against kernel.

{name} resolves to kernel.lookup(name).map(|v| v.to_display_string()). Value::None (an unset extern slot) doesn’t match — falls through to the unresolved-name error path at the fixed point.

Returns a typed crate::dsl::compile::EmbeddingError per E7 of the spec; the underlying string-form interpolate_with_lookup is kept for callers that compose their own lookup and don’t want the typed-error overhead.