Skip to main content

Module approval

Module approval 

Source
Expand description

Human approval before an effect runs.

An effect that requires approval (EffectBuilder::require_approval, EffectHandler::requires_approval) goes Pending → AwaitingApproval before its first attempt. The record is durable, so a pending approval survives restarts. Decisions come from two places:

Approval is asked once: an approved effect is never asked again, even if it retries. The precondition is checked again after approval, since the decision may have taken a while.

Structs§

ApprovalRequest
What an approver is asked to decide.
CliApproval
Asks at the terminal: prints the request and reads y or n.

Enums§

ApprovalDecision
An approver’s answer.

Traits§

ApprovalProvider
Decides whether effects that require approval may run.