pub struct PersistentRuntimeDriver { /* private fields */ }Expand description
Persistent runtime driver — durable InputState via RuntimeStore.
Implementations§
Source§impl PersistentRuntimeDriver
impl PersistentRuntimeDriver
Sourcepub fn new(
runtime_id: LogicalRuntimeId,
store: Arc<dyn RuntimeStore>,
blob_store: Arc<dyn BlobStore>,
) -> Self
pub fn new( runtime_id: LogicalRuntimeId, store: Arc<dyn RuntimeStore>, blob_store: Arc<dyn BlobStore>, ) -> Self
Create a new persistent runtime driver.
Sourcepub fn inner_ref(&self) -> &EphemeralRuntimeDriver
pub fn inner_ref(&self) -> &EphemeralRuntimeDriver
Get immutable reference to the inner ephemeral driver.
Sourcepub fn set_silent_comms_intents(&mut self, intents: Vec<String>)
pub fn set_silent_comms_intents(&mut self, intents: Vec<String>)
Set the list of comms intents that should be silently accepted (delegates to inner).
Sourcepub fn is_idle_or_attached(&self) -> bool
pub fn is_idle_or_attached(&self) -> bool
Check if the runtime is idle or attached (delegates to inner).
Sourcepub fn attach(&mut self) -> Result<(), RuntimeStateTransitionError>
pub fn attach(&mut self) -> Result<(), RuntimeStateTransitionError>
Attach an executor (Idle → Attached). Delegates to inner.
Sourcepub fn detach(
&mut self,
) -> Result<Option<RuntimeState>, RuntimeStateTransitionError>
pub fn detach( &mut self, ) -> Result<Option<RuntimeState>, RuntimeStateTransitionError>
Detach an executor (Attached → Idle). Delegates to inner.
Sourcepub fn start_run(
&mut self,
run_id: RunId,
) -> Result<(), RuntimeStateTransitionError>
pub fn start_run( &mut self, run_id: RunId, ) -> Result<(), RuntimeStateTransitionError>
Start a new run (delegates to inner).
Sourcepub fn complete_run(&mut self) -> Result<RunId, RuntimeStateTransitionError>
pub fn complete_run(&mut self) -> Result<RunId, RuntimeStateTransitionError>
Complete a run (delegates to inner).
Sourcepub fn drain_events(&mut self) -> Vec<RuntimeEventEnvelope>
pub fn drain_events(&mut self) -> Vec<RuntimeEventEnvelope>
Get pending events (delegates to inner).
Sourcepub fn take_wake_requested(&mut self) -> bool
pub fn take_wake_requested(&mut self) -> bool
Check and clear wake flag (delegates to inner).
Sourcepub fn take_process_requested(&mut self) -> bool
pub fn take_process_requested(&mut self) -> bool
Check and clear immediate processing flag (delegates to inner).
Sourcepub fn dequeue_next(&mut self) -> Option<(InputId, Input)>
pub fn dequeue_next(&mut self) -> Option<(InputId, Input)>
Dequeue next input (delegates to inner).
Sourcepub fn dequeue_by_id(&mut self, input_id: &InputId) -> Option<(InputId, Input)>
pub fn dequeue_by_id(&mut self, input_id: &InputId) -> Option<(InputId, Input)>
Dequeue a specific input by ID (delegates to inner).
Sourcepub fn persisted_input(&self, input_id: &InputId) -> Option<&Input>
pub fn persisted_input(&self, input_id: &InputId) -> Option<&Input>
Look up the persisted input for a given ID (delegates to inner).
pub fn has_queued_input_outside(&self, excluded: &[InputId]) -> bool
Sourcepub fn stage_input(
&mut self,
input_id: &InputId,
run_id: &RunId,
) -> Result<(), InputLifecycleError>
pub fn stage_input( &mut self, input_id: &InputId, run_id: &RunId, ) -> Result<(), InputLifecycleError>
Stage input (delegates to inner).
Sourcepub fn stage_batch(
&mut self,
input_ids: &[InputId],
run_id: &RunId,
) -> Result<(), InputLifecycleError>
pub fn stage_batch( &mut self, input_ids: &[InputId], run_id: &RunId, ) -> Result<(), InputLifecycleError>
Stage a batch of inputs atomically (delegates to inner).
Sourcepub fn apply_input(
&mut self,
input_id: &InputId,
run_id: &RunId,
) -> Result<(), InputLifecycleError>
pub fn apply_input( &mut self, input_id: &InputId, run_id: &RunId, ) -> Result<(), InputLifecycleError>
Apply input (delegates to inner).
Sourcepub fn rollback_staged(
&mut self,
input_ids: &[InputId],
) -> Result<(), InputLifecycleError>
pub fn rollback_staged( &mut self, input_ids: &[InputId], ) -> Result<(), InputLifecycleError>
Roll back staged inputs (delegates to inner).
Sourcepub fn consume_inputs(
&mut self,
input_ids: &[InputId],
run_id: &RunId,
) -> Result<(), InputLifecycleError>
pub fn consume_inputs( &mut self, input_ids: &[InputId], run_id: &RunId, ) -> Result<(), InputLifecycleError>
Consume applied inputs without completing a runtime run.
pub async fn abandon_pending_inputs( &mut self, reason: InputAbandonReason, ) -> Result<usize, RuntimeDriverError>
Sourcepub async fn recycle_preserving_work(
&mut self,
) -> Result<usize, RuntimeDriverError>
pub async fn recycle_preserving_work( &mut self, ) -> Result<usize, RuntimeDriverError>
Recycle the in-memory driver shell while preserving canonical pending work from durable runtime truth.
Unlike reset(), this must not abandon queued/staged work.