#[non_exhaustive]pub enum EffectOutcome<T> {
Committed(T),
Failed(ErrorRecord),
Rejected(ErrorRecord),
Unknown {
id: EffectId,
},
NeedsIntervention {
id: EffectId,
},
InProgress {
id: EffectId,
},
AwaitingApproval {
id: EffectId,
},
Compensated {
id: EffectId,
},
}Expand description
How an effect ended, or where it stands.
Unknown and NeedsIntervention are results, not errors: the effect may
have changed the outside world, and the caller must not treat it as
failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Committed(T)
The effect applied. Carries the action’s output, from this call or from the record of an earlier one.
Failed(ErrorRecord)
The effect definitely did not apply and will not be retried.
Rejected(ErrorRecord)
The effect was refused before it ran.
Unknown
The effect may or may not have applied. Calling again with the same key resolves it if that is safe.
NeedsIntervention
The runtime cannot resolve the outcome safely; an operator must.
InProgress
Another caller or worker is running the effect right now.
AwaitingApproval
The effect waits for a human decision. Call again later, or have an
operator use Runtime::approve /
Runtime::deny.
Compensated
The effect applied and was later undone by compensation.