pub trait RuntimeEventStore: Send + Sync {
// Required methods
fn append<'life0, 'async_trait>(
&'life0 self,
event: AgentEvent,
) -> Pin<Box<dyn Future<Output = Result<RuntimeEventEnvelope, RuntimeEventStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_after<'life0, 'async_trait>(
&'life0 self,
run_id: RunId,
after_seq: Option<u64>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeEventEnvelope>, RuntimeEventStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Authoritative replay source for runtime events.
Implementations are responsible for minting RuntimeEventId and the
per-run seq counter on RuntimeEventStore::append.
Required Methods§
Sourcefn append<'life0, 'async_trait>(
&'life0 self,
event: AgentEvent,
) -> Pin<Box<dyn Future<Output = Result<RuntimeEventEnvelope, RuntimeEventStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
event: AgentEvent,
) -> Pin<Box<dyn Future<Output = Result<RuntimeEventEnvelope, RuntimeEventStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Appends an event and returns the resulting envelope with identity and sequence assigned.
On failure the event MUST NOT be considered persisted; callers (such as
RuntimeEventBridge) rely on
this contract to avoid publishing live events whose replay source is
incomplete.
Sourcefn list_after<'life0, 'async_trait>(
&'life0 self,
run_id: RunId,
after_seq: Option<u64>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeEventEnvelope>, RuntimeEventStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_after<'life0, 'async_trait>(
&'life0 self,
run_id: RunId,
after_seq: Option<u64>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeEventEnvelope>, RuntimeEventStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Replays events for run_id with seq > after_seq.
after_seq = None replays from the beginning. limit caps the page
size to avoid unbounded memory use.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".