pub struct ExecContext { /* private fields */ }Expand description
Execution context — holds runtime variables for a single execution unit.
Implementations§
Source§impl ExecContext
impl ExecContext
Sourcepub fn new(flow_name: &str, persona_name: &str, unit_index: usize) -> Self
pub fn new(flow_name: &str, persona_name: &str, unit_index: usize) -> Self
Create a new context with unit-level variables pre-set.
Sourcepub fn vars(&self) -> &HashMap<String, String>
pub fn vars(&self) -> &HashMap<String, String>
v1.32.0 (D3) — the full variable map, for resolving ${name}
placeholders in a store where: clause against the flow context
(the Request Binding Contract on the synchronous filter path).
Sourcepub fn set_step(&mut self, step_name: &str, step_type: &str, step_index: usize)
pub fn set_step(&mut self, step_name: &str, step_type: &str, step_index: usize)
Set the current step context variables.
Sourcepub fn set_result(&mut self, step_name: &str, result: &str)
pub fn set_result(&mut self, step_name: &str, result: &str)
Record the result of a step (updates $result and ${StepName}).
Sourcepub fn interpolate(&self, text: &str) -> String
pub fn interpolate(&self, text: &str) -> String
Interpolate variables in a string.
Replaces ${name} and $name with their values from the context.
Unknown variables are left as-is. Delegates to the free
interpolate_vars so the streaming dispatcher interpolates
persist field values with byte-identical semantics (D5).
Sourcepub fn resolve_named_arg(&self, value: &str, value_kind: &str) -> String
pub fn resolve_named_arg(&self, value: &str, value_kind: &str) -> String
v2.10.0 — resolve a use Tool(k = v) keyword-arg value by its
value_kind (reference → binding lookup; literal → interpolation).
Delegates to the free resolve_named_arg_value so the sync runner and
the streaming dispatcher resolve kwargs byte-identically (D5).
Sourcepub fn user_bindings(&self) -> Vec<(String, String)>
pub fn user_bindings(&self) -> Vec<(String, String)>
The user-meaningful bindings — every variable that is not a
runner built-in ([BUILTIN_VARS]): let bindings and step
results keyed by step name. These are the columns a persist /
mutate into a postgresql-backed axonstore writes as a row
(v1.30.0). Sorted by name for deterministic SQL.
Trait Implementations§
Source§impl Clone for ExecContext
impl Clone for ExecContext
Source§fn clone(&self) -> ExecContext
fn clone(&self) -> ExecContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more