pub enum Trigger {
AfterTask(TaskId),
IfResult {
task: TaskId,
key: String,
value: String,
},
AfterTerminal(TaskId),
AtTick(u64),
}Expand description
A condition that, once satisfied, fires an Action.
Variants§
AfterTask(TaskId)
Dependency: fires once task reaches Done. The edge
after_task:<id> of the plan.
IfResult
Branch: fires once task is Done and its recorded result
at key equals value (the if_result:<path matches> shape).
Fields
AfterTerminal(TaskId)
Failure-aware dependency: fires once task reaches either
terminal state (Done or Failed). This is the primitive
failure propagation needs — AfterTask only observes Done, so
a failed predecessor would leave its dependents armed forever.
A handler inspects the predecessor’s status to branch on the
outcome (e.g. submit a compensating task on Failed).
AtTick(u64)
Timestamp: fires once the logical clock reaches tick. Time is
an explicit input (never now()), preserving determinism.
Implementations§
Source§impl Trigger
impl Trigger
Sourcepub fn is_satisfied(&self, world: &TriggerWorld<'_>) -> bool
pub fn is_satisfied(&self, world: &TriggerWorld<'_>) -> bool
Is this trigger’s condition satisfied in world? Pure and
deterministic.
Trait Implementations§
impl Eq for Trigger
impl StructuralPartialEq for Trigger
Auto Trait Implementations§
impl Freeze for Trigger
impl RefUnwindSafe for Trigger
impl Send for Trigger
impl Sync for Trigger
impl Unpin for Trigger
impl UnsafeUnpin for Trigger
impl UnwindSafe for Trigger
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.