Skip to main content

GovernedCommit

Struct GovernedCommit 

Source
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: Budget

Resource-capacity owner.

§propagation: PropagationPass

Preparation owner.

§actuation: ActuationPass

External-effect lifecycle owner.

§audit: AuditSink

Durable evidence owner.

§sequential: Sequential

Execution-order owner.

§phase: CommitPhase

Current concrete assembly phase.

§attempt_budget: Budget

Owner of bounded retry attempts.

§effect_applied: bool

Whether the external effect has been applied.

§evidence_persisted: bool

Whether durable evidence for the effect has been retained.

§recovery_intent: bool

Whether durable recovery intent has been retained.

§crashed: bool

Whether the modeled process is currently crashed.

Implementations§

Source§

impl GovernedCommit

Source

pub fn new(resource: u64, capacity: u64, max_attempts: u64) -> GovernedCommit

Construct one pending bounded request.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn recover(&mut self)

Finish a partial failure without reissuing the already applied effect.

Source

pub fn crash(&mut self)

Crash only the volatile process boundary. All fields named by the persistence abstraction remain unchanged and therefore survive restart.

Source

pub fn restart(&mut self)

Restart the volatile process state without changing durable owners.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.