pub struct ManagedExecutionStore { /* private fields */ }Expand description
Strict durable repository used by the local ExecutionManager.
Implementations§
Source§impl ManagedExecutionStore
impl ManagedExecutionStore
pub fn new(path: impl Into<PathBuf>) -> Self
pub fn path(&self) -> &Path
Sourcepub fn get(
&self,
execution_id: &ExecutionId,
) -> ManagedExecutionStoreResult<Option<BoxRecord>>
pub fn get( &self, execution_id: &ExecutionId, ) -> ManagedExecutionStoreResult<Option<BoxRecord>>
Return one managed record without mutating or reconciling state.
Sourcepub fn list(&self) -> ManagedExecutionStoreResult<Vec<BoxRecord>>
pub fn list(&self) -> ManagedExecutionStoreResult<Vec<BoxRecord>>
Return every managed record without reconciling provider state.
Legacy CLI records share the same state file and are deliberately excluded. Loading remains strict: one malformed managed record fails the complete snapshot instead of letting provider discovery skip corrupt ownership metadata.
Sourcepub fn get_by_operation_id(
&self,
operation_id: &OperationId,
) -> ManagedExecutionStoreResult<Option<BoxRecord>>
pub fn get_by_operation_id( &self, operation_id: &OperationId, ) -> ManagedExecutionStoreResult<Option<BoxRecord>>
Return the record reserved by an idempotent creation operation.
Sourcepub fn reserve(
&self,
record: BoxRecord,
) -> ManagedExecutionStoreResult<ManagedExecutionReservation>
pub fn reserve( &self, record: BoxRecord, ) -> ManagedExecutionStoreResult<ManagedExecutionReservation>
Atomically reserve one creation operation before backend side effects.
Retrying the same operation with the same full request returns the existing record. Reusing an operation ID for different creation intent fails without changing durable state.
Sourcepub fn begin_remove(
&self,
execution_id: &ExecutionId,
expected_generation: ExecutionGeneration,
) -> ManagedExecutionStoreResult<Option<BoxRecord>>
pub fn begin_remove( &self, execution_id: &ExecutionId, expected_generation: ExecutionGeneration, ) -> ManagedExecutionStoreResult<Option<BoxRecord>>
Claim terminal-record removal before deleting host resources.
The durable removing state prevents another lifecycle operation from
reviving the execution while cleanup is in progress. A retry observes
the same claim and can resume cleanup after a process crash.
Sourcepub fn finish_remove(
&self,
execution_id: &ExecutionId,
expected_generation: ExecutionGeneration,
) -> ManagedExecutionStoreResult<bool>
pub fn finish_remove( &self, execution_id: &ExecutionId, expected_generation: ExecutionGeneration, ) -> ManagedExecutionStoreResult<bool>
Forget a generation only after its durable removal claim has completed.
Sourcepub fn transition(
&self,
execution_id: &ExecutionId,
expected_generation: ExecutionGeneration,
expected_state: ManagedExecutionState,
next_state: ManagedExecutionState,
) -> ManagedExecutionStoreResult<BoxRecord>
pub fn transition( &self, execution_id: &ExecutionId, expected_generation: ExecutionGeneration, expected_state: ManagedExecutionState, next_state: ManagedExecutionState, ) -> ManagedExecutionStoreResult<BoxRecord>
Atomically compare generation and state, then persist one legal edge.
Completing pause and resume, and advancing a restart from teardown to startup, increments the runtime generation exactly once. Other edges retain the current generation.
Sourcepub fn transition_with(
&self,
execution_id: &ExecutionId,
expected_generation: ExecutionGeneration,
expected_state: ManagedExecutionState,
next_state: ManagedExecutionState,
update: impl FnOnce(&mut BoxRecord),
) -> ManagedExecutionStoreResult<BoxRecord>
pub fn transition_with( &self, execution_id: &ExecutionId, expected_generation: ExecutionGeneration, expected_state: ManagedExecutionState, next_state: ManagedExecutionState, update: impl FnOnce(&mut BoxRecord), ) -> ManagedExecutionStoreResult<BoxRecord>
Persist one legal transition and update runtime evidence in the same transaction.
Trait Implementations§
Source§impl Clone for ManagedExecutionStore
impl Clone for ManagedExecutionStore
Source§fn clone(&self) -> ManagedExecutionStore
fn clone(&self) -> ManagedExecutionStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ManagedExecutionStore
impl RefUnwindSafe for ManagedExecutionStore
impl Send for ManagedExecutionStore
impl Sync for ManagedExecutionStore
impl Unpin for ManagedExecutionStore
impl UnsafeUnpin for ManagedExecutionStore
impl UnwindSafe for ManagedExecutionStore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more