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 list_due_wakeups<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScheduledWakeup>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn next_scheduled_wakeup<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<ScheduledWakeup>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: '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 { ... }
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 list_due_wakeups<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScheduledWakeup>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_due_wakeups<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScheduledWakeup>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List wait timers and delayed retries due at or before now.
The default implementation replays every run for compatibility with custom stores. SQL stores override it with an indexed projection.
Sourcefn next_scheduled_wakeup<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<ScheduledWakeup>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_scheduled_wakeup<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<ScheduledWakeup>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the earliest wait timer or delayed retry across active runs.
Active hooks are excluded because they do not have a scheduled time.
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".