pub struct WorkflowContext {
pub variables: HashMap<String, String>,
pub step_outputs: HashMap<String, String>,
}Expand description
Workflow execution context — shared state that flows between levels.
Fields§
§variables: HashMap<String, String>Context variables (initially from WorkflowConfig, updated by steps).
step_outputs: HashMap<String, String>Results from completed steps (available to subsequent steps).
Implementations§
Source§impl WorkflowContext
impl WorkflowContext
Sourcepub fn from_config(config: &WorkflowConfig) -> Self
pub fn from_config(config: &WorkflowConfig) -> Self
Create a context from workflow config variables.
Sourcepub fn set_variable(&mut self, key: impl Into<String>, value: impl Into<String>)
pub fn set_variable(&mut self, key: impl Into<String>, value: impl Into<String>)
Set a variable.
Sourcepub fn get_variable(&self, key: &str) -> Option<&String>
pub fn get_variable(&self, key: &str) -> Option<&String>
Get a variable.
Trait Implementations§
Source§impl Clone for WorkflowContext
impl Clone for WorkflowContext
Source§impl Debug for WorkflowContext
impl Debug for WorkflowContext
Source§impl<'de> Deserialize<'de> for WorkflowContext
impl<'de> Deserialize<'de> for WorkflowContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WorkflowContext
impl RefUnwindSafe for WorkflowContext
impl Send for WorkflowContext
impl Sync for WorkflowContext
impl Unpin for WorkflowContext
impl UnsafeUnpin for WorkflowContext
impl UnwindSafe for WorkflowContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more