Skip to main content

RuntimePersistence

Trait RuntimePersistence 

Source
pub trait RuntimePersistence:
    AttachmentManifest
    + Send
    + Sync {
Show 30 methods // Required methods fn load_session<'life0, 'async_trait>( &'life0 self, scope: SessionReadScope, ) -> Pin<Box<dyn Future<Output = Result<Option<PersistedSessionRead>, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn load_node<'life0, 'life1, 'async_trait>( &'life0 self, node_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<SessionNodeRecord>, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn commit_runtime_state<'life0, 'async_trait>( &'life0 self, commit: RuntimeCommit, ) -> Pin<Box<dyn Future<Output = Result<RuntimeCommitResult, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn try_claim_session_execution_lease<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 str, owner: &'life2 LeaseOwnerIdentity, lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn reclaim_session_execution_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session_id: &'life1 str, owner: &'life2 LeaseOwnerIdentity, observed_holder: &'life3 SessionExecutionLeaseFence, lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait; fn renew_session_execution_lease<'life0, 'life1, 'async_trait>( &'life0 self, fence: &'life1 SessionExecutionLeaseFence, lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLease, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn release_session_execution_lease<'life0, 'life1, 'async_trait>( &'life0 self, completion: &'life1 SessionExecutionLeaseCompletion, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn save_session_meta<'life0, 'async_trait>( &'life0 self, meta: SessionMeta, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn load_session_meta<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<SessionMeta>, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn tombstone_nodes<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn vacuum<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<VacuumReport, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn gc_unreachable<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GcReport, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; // Provided methods fn durability_tier(&self) -> DurabilityTier { ... } 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_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_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 { ... } fn enqueue_queued_work<'life0, 'async_trait>( &'life0 self, _batch: QueuedWorkBatchDraft, ) -> Pin<Box<dyn Future<Output = Result<QueuedWorkBatch, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait { ... } fn claim_leading_ready_session_command<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session_id: &'life1 str, _session_execution_lease: &'life2 SessionExecutionLeaseFence, _owner: &'life3 LeaseOwnerIdentity, _lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait { ... } fn claim_ready_queued_work<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session_id: &'life1 str, _session_execution_lease: &'life2 SessionExecutionLeaseFence, _owner: &'life3 LeaseOwnerIdentity, _boundary: QueuedWorkClaimBoundary, _lease_ttl_ms: u64, _max_batches: usize, ) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait { ... } fn claim_ready_queued_work_by_batch_ids<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, session_id: &'life1 str, session_execution_lease: &'life2 SessionExecutionLeaseFence, owner: &'life3 LeaseOwnerIdentity, boundary: QueuedWorkClaimBoundary, lease_ttl_ms: u64, batch_ids: &'life4 [String], ) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, Self: 'async_trait { ... } fn renew_queued_work_claim<'life0, 'life1, 'async_trait>( &'life0 self, claim: &'life1 QueuedWorkClaim, _lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<QueuedWorkClaim, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn abandon_queued_work_claim<'life0, 'life1, 'async_trait>( &'life0 self, _claim: &'life1 QueuedWorkClaim, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn cancel_queued_work_batch<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _session_id: &'life1 str, _batch_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait { ... } fn list_queued_work<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn list_pending_queued_work<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... }
}
Expand description

Exact settled-session persistence protocol required by the runtime.

This is the runtime’s atomic transaction facade for visible session state: session graph/head commits, queued-work ingress and completion, final turn-commit idempotency, metadata, usage, and the attachment write-ahead manifest. In-flight nondeterministic work belongs to the active EffectHost, not to the store contract.

The AttachmentManifest supertrait is required so the runtime can wrap any persistence backend with a SessionScopedAttachmentStore without dual-trait casting. Backends with no attachment-write story can implement the manifest methods as no-ops via [NoopAttachmentManifest]’s blanket helpers.

Required Methods§

Source

fn load_session<'life0, 'async_trait>( &'life0 self, scope: SessionReadScope, ) -> Pin<Box<dyn Future<Output = Result<Option<PersistedSessionRead>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn load_node<'life0, 'life1, 'async_trait>( &'life0 self, node_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<SessionNodeRecord>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn commit_runtime_state<'life0, 'async_trait>( &'life0 self, commit: RuntimeCommit, ) -> Pin<Box<dyn Future<Output = Result<RuntimeCommitResult, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn try_claim_session_execution_lease<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 str, owner: &'life2 LeaseOwnerIdentity, lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Try to claim the durable single-writer execution lane for session_id.

Returns SessionExecutionLeaseClaimOutcome::Busy when another owner holds an unexpired lease. Expired or released leases may be reclaimed and receive a higher fencing token. An unexpired lease held by the same owner id but a different incarnation is busy.

Source

fn reclaim_session_execution_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session_id: &'life1 str, owner: &'life2 LeaseOwnerIdentity, observed_holder: &'life3 SessionExecutionLeaseFence, lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

Reclaim an unexpired session execution lease whose observed holder is definitely dead according to persisted local-process liveness metadata.

Backends must CAS on observed_holder so a stale claimant cannot clear a newer live lease that won the race after the busy observation.

Source

fn renew_session_execution_lease<'life0, 'life1, 'async_trait>( &'life0 self, fence: &'life1 SessionExecutionLeaseFence, lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLease, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Extend a live session execution lease owned by the caller.

Backends must reject stale, released, superseded, or expired fences with StoreError::SessionExecutionLeaseExpired.

Source

fn release_session_execution_lease<'life0, 'life1, 'async_trait>( &'life0 self, completion: &'life1 SessionExecutionLeaseCompletion, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Release a session execution lease fenced by its completion token.

This operation is idempotent and must not clear a newer owner’s lease.

Source

fn save_session_meta<'life0, 'async_trait>( &'life0 self, meta: SessionMeta, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn load_session_meta<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<SessionMeta>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn tombstone_nodes<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn vacuum<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<VacuumReport, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn gc_unreachable<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GcReport, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Provided Methods§

Source

fn durability_tier(&self) -> DurabilityTier

Durability tier this session store provides; defaults to [DurabilityTier::Inline].

Source

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.

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

fn enqueue_queued_work<'life0, 'async_trait>( &'life0 self, _batch: QueuedWorkBatchDraft, ) -> Pin<Box<dyn Future<Output = Result<QueuedWorkBatch, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Persist a queued-work batch for later claiming.

The default implementation rejects the batch: backends that do not support queued work inherit it and stay loud rather than silently dropping work.

Source

fn claim_leading_ready_session_command<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session_id: &'life1 str, _session_execution_lease: &'life2 SessionExecutionLeaseFence, _owner: &'life3 LeaseOwnerIdentity, _lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

Claim a leading ready session-command batch for owner_id.

A command claim is returned only when the earliest ready claimable batch is classified as crate::runtime::QueuedWorkClass::SessionCommand. Backends derive the class from queued payloads; no schema column is required. The default implementation reports queued work as unsupported.

Source

fn claim_ready_queued_work<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session_id: &'life1 str, _session_execution_lease: &'life2 SessionExecutionLeaseFence, _owner: &'life3 LeaseOwnerIdentity, _boundary: QueuedWorkClaimBoundary, _lease_ttl_ms: u64, _max_batches: usize, ) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

Claim the next ready turn-work group for owner_id.

A turn-work claim is returned only when the earliest ready claimable batch is classified as crate::runtime::QueuedWorkClass::TurnWork. Earlier ready session commands are not skipped and are never materialized as turn input.

The default implementation reports queued work as unsupported.

Source

fn claim_ready_queued_work_by_batch_ids<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, session_id: &'life1 str, session_execution_lease: &'life2 SessionExecutionLeaseFence, owner: &'life3 LeaseOwnerIdentity, boundary: QueuedWorkClaimBoundary, lease_ttl_ms: u64, batch_ids: &'life4 [String], ) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, Self: 'async_trait,

Claim a specific ready batch set selected from the durable queue.

This is the host-facing counterpart to [claim_ready_queued_work]: callers that project queued work into a UI can claim the exact batch ids they rendered instead of reconstructing authority from local draft state. The default implementation preserves the ordered queue contract by claiming the next ready group and returning it only when the durable ids match exactly.

Source

fn renew_queued_work_claim<'life0, 'life1, 'async_trait>( &'life0 self, claim: &'life1 QueuedWorkClaim, _lease_ttl_ms: u64, ) -> Pin<Box<dyn Future<Output = Result<QueuedWorkClaim, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Extend the lease on a held queued-work claim.

The default implementation reports the claim as expired, matching a backend that never granted one.

Source

fn abandon_queued_work_claim<'life0, 'life1, 'async_trait>( &'life0 self, _claim: &'life1 QueuedWorkClaim, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Release a held queued-work claim without completing it.

The default implementation is a no-op: with no queued work there is nothing to release.

Source

fn cancel_queued_work_batch<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _session_id: &'life1 str, _batch_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Remove an unclaimed queued-work batch from durable ingress.

Returns the removed batch when cancellation won the race. Returns None when the batch is missing or currently held by a live claim; callers must treat that as “already claimed or completed” and must not restore any stale local draft state.

The default implementation reports None (nothing queued, nothing to cancel).

Source

fn list_queued_work<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

List all queued-work batches for a session.

The default implementation reports an empty queue.

Source

fn list_pending_queued_work<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

List queued-work batches that are still pending presentation/editing.

This excludes batches currently held by a live claim. Expired claims are considered pending again because they can be reclaimed or cancelled.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§