pub struct WorkflowContext {
pub branch_id: String,
pub config: Value,
pub instance_metadata: Value,
pub state: Arc<dyn State>,
pub recorder: Arc<dyn RunRecorder>,
pub trigger_kind: String,
}Expand description
The execution context handed to every step node.
Port of the subset of WorkflowContext a node legitimately touches:
branch id (for state scoping), instance config + metadata (for template
resolution), and the state handle. I/O tool calls (ctx.do(...)) are the
next porting phase.
Fields§
§branch_id: String§config: Value§instance_metadata: Value§state: Arc<dyn State>§recorder: Arc<dyn RunRecorder>§trigger_kind: StringImplementations§
Source§impl WorkflowContext
impl WorkflowContext
pub fn new(branch_id: impl Into<String>, state: Arc<dyn State>) -> Self
pub fn with_config(self, config: Value) -> Self
pub fn with_recorder(self, recorder: Arc<dyn RunRecorder>) -> Self
pub fn with_trigger_kind(self, trigger_kind: impl Into<String>) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for WorkflowContext
impl !UnwindSafe for WorkflowContext
impl Freeze for WorkflowContext
impl Send for WorkflowContext
impl Sync for WorkflowContext
impl Unpin for WorkflowContext
impl UnsafeUnpin 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