pub trait TurnInputStore: Send + Sync {
// Required methods
fn enqueue_pending_turn_input<'life0, 'async_trait>(
&'life0 self,
input: PendingTurnInputDraft,
) -> Pin<Box<dyn Future<Output = Result<PendingTurnInput, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn list_pending_turn_inputs<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingTurnInput>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn cancel_pending_turn_inputs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
targets: &'life2 [PendingTurnInputCancelTarget],
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingTurnInputCancelResult>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn cancel_pending_turn_input_suffix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
anchor: &'life2 PendingTurnInputCancelTarget,
) -> Pin<Box<dyn Future<Output = Result<PendingTurnInputSuffixCancelOutcome, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn claim_active_turn_inputs<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
session_execution_lease: &'life2 SessionExecutionLeaseFence,
owner: &'life3 LeaseOwnerIdentity,
turn_id: &'life4 str,
checkpoint: CheckpointKind,
lease_ttl_ms: u64,
max_inputs: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<TurnInputClaim>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait;
fn claim_next_turn_inputs<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
session_execution_lease: &'life2 SessionExecutionLeaseFence,
owner: &'life3 LeaseOwnerIdentity,
lease_ttl_ms: u64,
max_inputs: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<TurnInputClaim>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn abandon_turn_input_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
claim: &'life1 TurnInputClaim,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
// Provided method
fn cancel_pending_turn_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
input_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PendingTurnInputCancelOutcome, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait { ... }
}Expand description
Pending turn-input lifecycle capability: durable ingress for model-visible user input.
Active-turn ingress is claimed only by the matching live turn at a
checkpoint. Next-turn ingress is claimed only by idle dispatch. User input
must not be represented as generic queued work. Claims granted here are
completed atomically by SessionCommitStore::commit_runtime_state.
Required Methods§
Sourcefn enqueue_pending_turn_input<'life0, 'async_trait>(
&'life0 self,
input: PendingTurnInputDraft,
) -> Pin<Box<dyn Future<Output = Result<PendingTurnInput, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn enqueue_pending_turn_input<'life0, 'async_trait>(
&'life0 self,
input: PendingTurnInputDraft,
) -> Pin<Box<dyn Future<Output = Result<PendingTurnInput, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Persist model-visible user input into the pending turn-input lifecycle.
Sourcefn list_pending_turn_inputs<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingTurnInput>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list_pending_turn_inputs<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingTurnInput>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
List pending user inputs for UI reconciliation and queue preview.
This excludes completed/cancelled rows and rows currently held by a live claim. Expired claims are visible again according to their state.
Sourcefn cancel_pending_turn_inputs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
targets: &'life2 [PendingTurnInputCancelTarget],
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingTurnInputCancelResult>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn cancel_pending_turn_inputs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
targets: &'life2 [PendingTurnInputCancelTarget],
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingTurnInputCancelResult>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Atomically cancel a list of pending user inputs by input id or source key.
Sourcefn cancel_pending_turn_input_suffix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
anchor: &'life2 PendingTurnInputCancelTarget,
) -> Pin<Box<dyn Future<Output = Result<PendingTurnInputSuffixCancelOutcome, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn cancel_pending_turn_input_suffix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
anchor: &'life2 PendingTurnInputCancelTarget,
) -> Pin<Box<dyn Future<Output = Result<PendingTurnInputSuffixCancelOutcome, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Atomically cancel the same-session runtime-admission suffix from an anchor.
Sourcefn claim_active_turn_inputs<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
session_execution_lease: &'life2 SessionExecutionLeaseFence,
owner: &'life3 LeaseOwnerIdentity,
turn_id: &'life4 str,
checkpoint: CheckpointKind,
lease_ttl_ms: u64,
max_inputs: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<TurnInputClaim>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn claim_active_turn_inputs<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
session_execution_lease: &'life2 SessionExecutionLeaseFence,
owner: &'life3 LeaseOwnerIdentity,
turn_id: &'life4 str,
checkpoint: CheckpointKind,
lease_ttl_ms: u64,
max_inputs: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<TurnInputClaim>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Claim active-turn input at a checkpoint for the live turn id.
Sourcefn claim_next_turn_inputs<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
session_execution_lease: &'life2 SessionExecutionLeaseFence,
owner: &'life3 LeaseOwnerIdentity,
lease_ttl_ms: u64,
max_inputs: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<TurnInputClaim>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn claim_next_turn_inputs<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
session_execution_lease: &'life2 SessionExecutionLeaseFence,
owner: &'life3 LeaseOwnerIdentity,
lease_ttl_ms: u64,
max_inputs: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<TurnInputClaim>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Claim queued next-turn input at idle.
Sourcefn abandon_turn_input_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
claim: &'life1 TurnInputClaim,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn abandon_turn_input_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
claim: &'life1 TurnInputClaim,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Abandon a held pending-turn-input claim so it can be reclaimed.
Provided Methods§
Sourcefn cancel_pending_turn_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
input_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PendingTurnInputCancelOutcome, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn cancel_pending_turn_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
input_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PendingTurnInputCancelOutcome, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Cancel an unclaimed pending user input by id.
Provided convenience: the singular form is exactly
cancel_pending_turn_inputs with a
one-element target list, so backends implement only the plural
primitive.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".