pub trait StepContext {
// Required methods
fn step_index(&self, step_id: &str) -> Option<usize>;
fn is_completed(&self, step_index: usize) -> bool;
fn get_result(&self, step_index: usize) -> Option<&FlowResult>;
fn get_input(&self) -> Option<&ValueRef>;
fn get_variable(&self, name: &str) -> Option<ValueRef>;
fn get_variable_secrets(&self, name: &str) -> Secrets;
}Expand description
Provides access to execution state for expression evaluation.
This trait allows ValueExpr::needed_steps() to determine which steps
are needed to evaluate an expression, and ValueExpr::resolve() to
evaluate expressions using available state.
Required Methods§
Sourcefn step_index(&self, step_id: &str) -> Option<usize>
fn step_index(&self, step_id: &str) -> Option<usize>
Get the index of a step by its ID.
Returns None if the step ID is not found in the workflow.
Sourcefn is_completed(&self, step_index: usize) -> bool
fn is_completed(&self, step_index: usize) -> bool
Check if a step has completed execution.
A step is completed if it has a result (success, skipped, or failed).
Sourcefn get_result(&self, step_index: usize) -> Option<&FlowResult>
fn get_result(&self, step_index: usize) -> Option<&FlowResult>
Get the result of a completed step.
Returns None if the step has not completed or the index is invalid.
Sourcefn get_input(&self) -> Option<&ValueRef>
fn get_input(&self) -> Option<&ValueRef>
Get the workflow input value.
Returns None if input is not available in this context.
Sourcefn get_variable(&self, name: &str) -> Option<ValueRef>
fn get_variable(&self, name: &str) -> Option<ValueRef>
Get a variable value by name.
Returns None if the variable is not defined. The implementation
may fall back to schema defaults before returning None.
Returns an owned ValueRef since defaults may be computed.
Sourcefn get_variable_secrets(&self, name: &str) -> Secrets
fn get_variable_secrets(&self, name: &str) -> Secrets
Get the secrets configuration for a variable.
Used for redacting sensitive values in logs.