pub trait FlowEventStore: Send + Sync {
// Required methods
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
event: FlowEvent,
) -> Pin<Box<dyn Future<Output = Result<FlowEventEnvelope>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn append_if_sequence<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
expected_sequence: u64,
event: FlowEvent,
) -> Pin<Box<dyn Future<Output = Result<FlowEventEnvelope>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<FlowEventEnvelope>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_run_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn find_active_hooks_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveHookSnapshot>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn list_active_hooks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveHookSnapshot>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Append-only event store for durable workflow runs.
Required Methods§
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
event: FlowEvent,
) -> Pin<Box<dyn Future<Output = Result<FlowEventEnvelope>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append_if_sequence<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
expected_sequence: u64,
event: FlowEvent,
) -> Pin<Box<dyn Future<Output = Result<FlowEventEnvelope>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<FlowEventEnvelope>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_run_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn find_active_hooks_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveHookSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_active_hooks_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveHookSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find active hooks that own an external callback token.
The default implementation replays every run for compatibility with custom stores. SQL stores override it with their indexed projection.
Sourcefn list_active_hooks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveHookSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_active_hooks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveHookSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List active external callback hooks in stable run/hook order.
The default implementation preserves the append-only store contract by projecting histories. Durable SQL adapters provide a materialized path.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".