pub struct GovernedCommit {
pub registry: ResourceRegistry<u64, u64>,
pub budget: Budget,
pub propagation: PropagationPass,
pub actuation: ActuationPass,
pub audit: AuditSink,
pub sequential: Sequential,
pub phase: CommitPhase,
pub attempt_budget: Budget,
pub effect_applied: bool,
pub evidence_persisted: bool,
pub recovery_intent: bool,
pub crashed: bool,
}Expand description
One bounded integrated request. The component fields are the actual executable carriers; the remaining fields expose the external effect, persistence, failure, and recovery boundary absent from the individual rows.
Fields§
§registry: ResourceRegistry<u64, u64>Registry owner for the admitted request.
budget: BudgetResource-capacity owner.
propagation: PropagationPassPreparation owner.
actuation: ActuationPassExternal-effect lifecycle owner.
audit: AuditSinkDurable evidence owner.
sequential: SequentialExecution-order owner.
phase: CommitPhaseCurrent concrete assembly phase.
attempt_budget: BudgetOwner of bounded retry attempts.
effect_applied: boolWhether the external effect has been applied.
evidence_persisted: boolWhether durable evidence for the effect has been retained.
recovery_intent: boolWhether durable recovery intent has been retained.
crashed: boolWhether the modeled process is currently crashed.
Implementations§
Source§impl GovernedCommit
impl GovernedCommit
Sourcepub fn new(resource: u64, capacity: u64, max_attempts: u64) -> GovernedCommit
pub fn new(resource: u64, capacity: u64, max_attempts: u64) -> GovernedCommit
Construct one pending bounded request.
Sourcepub fn admit(&mut self) -> bool
pub fn admit(&mut self) -> bool
Budget admission. Capacity rejection is an explicit terminal API result and leaves every claim-bearing carrier other than the phase unchanged.
Sourcepub fn propagate(&mut self)
pub fn propagate(&mut self)
Run the one-node propagation witness and advance the Sequential carrier. This is the bounded readiness stage between admission and effect commit.
Sourcepub fn fail_before_effect(&mut self) -> bool
pub fn fail_before_effect(&mut self) -> bool
Record a failed external-service attempt before any effect occurred.
Calling this action again from Retryable is the explicit bounded retry
path; the last permitted failure is a terminal rejection.
Sourcepub fn fail_after_effect(&mut self)
pub fn fail_after_effect(&mut self)
Record the external effect together with a durable recovery intent, then
expose the modeled failure before the audit evidence commit. The effect must not
be retried; only recover may complete this state.
Sourcepub fn commit_success(&mut self)
pub fn commit_success(&mut self)
Atomic success boundary for the bounded persistence adapter: effect receipt, unit-budget commit, audit append, and sequential closure become visible together at method return.
Sourcepub fn recover(&mut self)
pub fn recover(&mut self)
Finish a partial failure without reissuing the already applied effect.