pub trait CommandContextRepository: Send + Sync {
// Required methods
fn bind_command_context_run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
run_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<StoredCommandContext>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn expired_command_contexts<'life0, 'life1, 'async_trait>(
&'life0 self,
now: u64,
after: Option<&'life1 CommandContextSweepCursor>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<(ResourceScope, StoredCommandContext)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn acknowledge_context_command<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
command_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn compact_command_context<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn context_commands<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
after: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, String)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn store_command_context<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
value: StoredCommandContext,
) -> Pin<Box<dyn Future<Output = Result<StoredCommandContext>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn command_context<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredCommandContext>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn close_command_context<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
expected_version: u64,
) -> Pin<Box<dyn Future<Output = Result<StoredCommandContext>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Dedicated indexed storage; contexts never inflate the scope metadata snapshot.
Required Methods§
fn bind_command_context_run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
run_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<StoredCommandContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Sourcefn expired_command_contexts<'life0, 'life1, 'async_trait>(
&'life0 self,
now: u64,
after: Option<&'life1 CommandContextSweepCursor>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<(ResourceScope, StoredCommandContext)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn expired_command_contexts<'life0, 'life1, 'async_trait>(
&'life0 self,
now: u64,
after: Option<&'life1 CommandContextSweepCursor>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<(ResourceScope, StoredCommandContext)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Indexed cross-scope sweep. The cursor advances even when a provider is unavailable.
Sourcefn acknowledge_context_command<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
command_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn acknowledge_context_command<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
command_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Remove a confirmed terminal command from the cleanup queue.
Sourcefn compact_command_context<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn compact_command_context<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Compact a closed context only after its command queue is empty. Keep the idempotency tombstone.
fn context_commands<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
after: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, String)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn store_command_context<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
value: StoredCommandContext,
) -> Pin<Box<dyn Future<Output = Result<StoredCommandContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn command_context<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredCommandContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn close_command_context<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ResourceScope,
id: &'life2 str,
expected_version: u64,
) -> Pin<Box<dyn Future<Output = Result<StoredCommandContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".