Skip to main content

RunEventStore

Trait RunEventStore 

Source
pub trait RunEventStore: Send + Sync {
    // Required methods
    fn append_event<'life0, 'async_trait>(
        &'life0 self,
        event: StoredRunEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_events<'life0, 'async_trait>(
        &'life0 self,
        run_id: Uuid,
        after_sequence: Option<u64>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<StoredRunEvent>, StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Appends and reads immutable run events.

Appends must be contiguous and start at sequence zero. A duplicate or out-of-order sequence is rejected. Reads are returned in ascending sequence order; after_sequence is an exclusive cursor for reconnectable consumers.

Required Methods§

Source

fn append_event<'life0, 'async_trait>( &'life0 self, event: StoredRunEvent, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_events<'life0, 'async_trait>( &'life0 self, run_id: Uuid, after_sequence: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<Vec<StoredRunEvent>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§