pub fn substitute_context(
template: &str,
context: &HashMap<String, Value>,
) -> StringExpand description
Substitute {key} placeholders in a template string with values from context.
Value conversion rules:
String-> raw string (no quotes)Number-> number as stringBool->"true"/"false"Null->"null"Array/Object-> JSON-serialized string
Unmatched placeholders are left as-is.
Warning: Do NOT use this for SQL queries (SQL injection risk) or for
substitution into serialized JSON (corruption risk with special characters).
Use substitute_context_bind_params for SQL and substitute_context_json
for serialized JSON.