pub trait VariableHandler {
// Required method
fn get_variable_value(
&self,
name: &str,
snapshot_id: usize,
) -> Result<DynSolValue>;
}Expand description
Handler trait for variable value resolution.
Implementations resolve variable names to their values in a specific execution context.
This includes local variables, state variables, and special variables like this.
Required Methods§
Sourcefn get_variable_value(
&self,
name: &str,
snapshot_id: usize,
) -> Result<DynSolValue>
fn get_variable_value( &self, name: &str, snapshot_id: usize, ) -> Result<DynSolValue>
Get the value of a variable by name.
§Arguments
name- The variable name to resolvesnapshot_id- The execution context identifier
§Returns
The variable’s value as a DynSolValue, or an error if the variable doesn’t exist