Skip to main content

ExecutionStageGuard

Struct ExecutionStageGuard 

Source
pub struct ExecutionStageGuard<'a> { /* private fields */ }
Expand description

One original stage’s fixed layout, retained under both workflow and child exclusion.

Existing attempt journals remain the only spending owner. create supplies no journals; prepare creates the complete original set. Reopening never creates, resets or reconstructs journals. Integrations retain exact learned inputs, authenticate their relation to settled originals, and qualify fresh authority, command custody and proof of no previous dispatch.

Implementations§

Source§

impl<'a> ExecutionStageGuard<'a>

Source

pub fn resume( workflow_layout: &'a BackupLayoutGuard, expected_workflow: &ArtifactChecksumRecord, sequence: u64, expected_binding: &ArtifactChecksumRecord, ) -> Result<(Self, ExecutionProgressView), ExecutionStageResumeError>

Resume an exact retained stage with its complete original journal progress.

Reuses record-only open and canonical complete-journal admission, then rechecks the original stage and ancestor histories before returning. Hold no attempt guards. Reads only retained local records, without creating journals, reading artifact trees or calling providers. Pending and exhausted spending is retained. The returned progress is a sequential local projection, not atomic custody, fresh permission, dispatch, authenticated receipt or terminal/release proof.

§Errors

Rejects missing/changed/unsafe originals, journal contention and invalid retained accounting/causality without repair or replenishing allowance.

Source

pub fn prepare( workflow_layout: &'a BackupLayoutGuard, binding: ExecutionStageBindingRecord, plan: OperationPlanRecord, ) -> Result<Self, ExecutionStagePreparationError>

Durably prepare a new stage and its complete original attempt-journal set.

Reuses create-only stage admission and the existing journal owner, taking one journal lock at a time. Every original authority is derived before stage allocation. No reservation, receipt, backend call or fresh dispatch authority follows. Hold no other attempt guards during preparation.

Partial preparation remains occupied and is never repaired by retrying. Reopen only retained originals and require complete execution admission; missing journals never mean unused allowance. A lost successful response can reopen the complete exact stage without creating another journal.

§Errors

Rejects invalid originals, occupied stages, journal contention and failed durable publication, preserving all partial records and original limits.

Source

pub fn create( workflow_layout: &'a BackupLayoutGuard, binding: ExecutionStageBindingRecord, plan: OperationPlanRecord, ) -> Result<Self, ExecutionWorkflowPersistenceError>

Create a fixed private stage directory, exact child plan and immutable binding.

Every original predecessor and ancestor needs its exact retained binding, plan and complete chronological Applied settlement. The directory is create-only: occupied or interrupted preparation is retained and cannot be recreated with another plan. No journal or backend effect occurs before return.

§Errors

Rejects changed allocation, unavailable prerequisites, occupied stages and IO failures.

Source

pub fn open( workflow_layout: &'a BackupLayoutGuard, expected_workflow: &ArtifactChecksumRecord, sequence: u64, expected_binding: &ArtifactChecksumRecord, ) -> Result<Self, ExecutionWorkflowPersistenceError>

Reopen an exact fixed stage without allocation, repair or journal creation.

Lost successful creation responses reconcile here. A partially prepared directory without both immutable records rejects and remains retained. Missing pending journals cannot be treated as unused allowance by the existing execution-progress or settlement owners.

§Errors

Rejects missing/changed original records, prerequisite history or ownership failures.

Source

pub const fn plan(&self) -> &OperationPlanRecord

Read the exact bound original child plan; no fresh permission is implied.

Source

pub const fn binding(&self) -> &ExecutionStageBindingRecord

Read the immutable original stage and predecessor commitments.

Source

pub fn layout( &self, ) -> Result<&BackupLayoutGuard, ExecutionWorkflowPersistenceError>

Re-admit both original records and expose the existing journal/layout owner.

Callers must use complete original journal admission for resume. Never create a missing journal on resume or substitute a freshly derived plan.

§Errors

Rejects changed roots, retained records or any ancestor settlement history.

Trait Implementations§

Source§

impl<'a> Debug for ExecutionStageGuard<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Same for T

Source§

type Output = T

Should always be Self
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, !>

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.