pub struct TriggerWorld<'a> {
pub tasks: &'a WorkflowState,
pub tick: u64,
pub results: &'a HashMap<TaskId, HashMap<String, String>>,
}Expand description
The deterministic world a trigger evaluates against. No now():
the clock is the explicit tick, results are an explicit map.
Fields§
§tasks: &'a WorkflowStateTask statuses (for the Done checks of after_task /
if_result).
tick: u64Logical clock — advanced by explicit Tick events.
results: &'a HashMap<TaskId, HashMap<String, String>>Recorded task results: task → (key → value). Content-
addressed in production (results/stepN.out.ref); a value map
here for branch evaluation.
Implementations§
Source§impl<'a> TriggerWorld<'a>
impl<'a> TriggerWorld<'a>
Sourcepub fn new(tasks: &'a WorkflowState, tick: u64) -> Self
pub fn new(tasks: &'a WorkflowState, tick: u64) -> Self
Build a world with no results (sufficient for after_task /
at_tick).
Sourcepub fn with_results(
tasks: &'a WorkflowState,
tick: u64,
results: &'a HashMap<TaskId, HashMap<String, String>>,
) -> Self
pub fn with_results( tasks: &'a WorkflowState, tick: u64, results: &'a HashMap<TaskId, HashMap<String, String>>, ) -> Self
Build a world with a caller-supplied results map — what
if_result branch evaluation needs. The SDK bindings hold the
results map on the trigger engine (populated via record_result)
and pass it here so on_task_change stays a one-arg call.
Auto Trait Implementations§
impl<'a> Freeze for TriggerWorld<'a>
impl<'a> RefUnwindSafe for TriggerWorld<'a>
impl<'a> Send for TriggerWorld<'a>
impl<'a> Sync for TriggerWorld<'a>
impl<'a> Unpin for TriggerWorld<'a>
impl<'a> UnsafeUnpin for TriggerWorld<'a>
impl<'a> UnwindSafe for TriggerWorld<'a>
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