inject_session_state

Function inject_session_state 

Source
pub fn inject_session_state(template: &str, state: &State) -> String
Expand description

Replace {key} placeholders in template with values from state.

  • {key} — required: if present in state, replaced with the string representation; if missing, left as-is (e.g., {unknown} stays {unknown})
  • {key?} — optional: if present in state, replaced; if missing, replaced with ""
  • Prefix keys are supported: {app:flag}, {user:name}, etc.