pub trait RuntimeDriver: Send + Sync {
// Required methods
fn accept_input<'life0, 'async_trait>(
&'life0 mut self,
input: Input,
) -> Pin<Box<dyn Future<Output = Result<AcceptOutcome, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn on_runtime_event<'life0, 'async_trait>(
&'life0 mut self,
event: RuntimeEventEnvelope,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn recover<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<RecoveryReport, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn runtime_state(&self) -> RuntimeState;
fn input_state(&self, input_id: &InputId) -> Option<&InputState>;
fn input_phase(&self, input_id: &InputId) -> Option<InputLifecycleState>;
fn input_last_run_id(&self, input_id: &InputId) -> Option<RunId>;
fn input_last_boundary_sequence(&self, input_id: &InputId) -> Option<u64>;
fn stored_input_state(&self, input_id: &InputId) -> Option<StoredInputState>;
fn input_id_for_idempotency_key(
&self,
idempotency_key: &str,
) -> Option<InputId>;
fn active_input_ids(&self) -> Vec<InputId>;
}Expand description
The runtime driver — per-session interface for input acceptance and lifecycle.
Each session gets its own RuntimeDriver instance. The driver manages the InputState ledger, policy resolution, and input queue for that session.
Required Methods§
Sourcefn accept_input<'life0, 'async_trait>(
&'life0 mut self,
input: Input,
) -> Pin<Box<dyn Future<Output = Result<AcceptOutcome, RuntimeDriverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn accept_input<'life0, 'async_trait>(
&'life0 mut self,
input: Input,
) -> Pin<Box<dyn Future<Output = Result<AcceptOutcome, RuntimeDriverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Accept an input into the runtime.
Sourcefn on_runtime_event<'life0, 'async_trait>(
&'life0 mut self,
event: RuntimeEventEnvelope,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeDriverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_runtime_event<'life0, 'async_trait>(
&'life0 mut self,
event: RuntimeEventEnvelope,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeDriverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a runtime event (from the event bus).
Sourcefn recover<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<RecoveryReport, RuntimeDriverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recover<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<RecoveryReport, RuntimeDriverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Recover from a crash/restart.
Sourcefn runtime_state(&self) -> RuntimeState
fn runtime_state(&self) -> RuntimeState
Get the current runtime state.
Sourcefn input_state(&self, input_id: &InputId) -> Option<&InputState>
fn input_state(&self, input_id: &InputId) -> Option<&InputState>
Get the state of a specific input.
Sourcefn input_phase(&self, input_id: &InputId) -> Option<InputLifecycleState>
fn input_phase(&self, input_id: &InputId) -> Option<InputLifecycleState>
Get the current DSL-owned lifecycle phase of a specific input.
Sourcefn input_last_run_id(&self, input_id: &InputId) -> Option<RunId>
fn input_last_run_id(&self, input_id: &InputId) -> Option<RunId>
Get the current DSL-owned last run association for a specific input.
Sourcefn input_last_boundary_sequence(&self, input_id: &InputId) -> Option<u64>
fn input_last_boundary_sequence(&self, input_id: &InputId) -> Option<u64>
Get the current DSL-owned last boundary sequence for a specific input.
Sourcefn stored_input_state(&self, input_id: &InputId) -> Option<StoredInputState>
fn stored_input_state(&self, input_id: &InputId) -> Option<StoredInputState>
Get the persisted shell+seed bundle for a specific input.
Sourcefn input_id_for_idempotency_key(&self, idempotency_key: &str) -> Option<InputId>
fn input_id_for_idempotency_key(&self, idempotency_key: &str) -> Option<InputId>
Resolve the machine-owned idempotency-key binding to its input id.
Read-only reconciliation mirror of the generated admission map — it decides nothing and never registers a binding (the accept-path admission resolution stays the only mutator).
Sourcefn active_input_ids(&self) -> Vec<InputId>
fn active_input_ids(&self) -> Vec<InputId>
List all non-terminal input IDs.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".