EventStore

Trait EventStore 

Source
pub trait EventStore: Send + Sync {
    // Required methods
    fn store_event<'life0, 'async_trait>(
        &'life0 self,
        session_id: String,
        stream_id: String,
        time_stamp: u128,
        message: String,
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn remove_by_session_id<'life0, 'async_trait>(
        &'life0 self,
        session_id: String,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn remove_stream_in_session<'life0, 'async_trait>(
        &'life0 self,
        session_id: String,
        stream_id: String,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn clear<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn events_after<'life0, 'async_trait>(
        &'life0 self,
        last_event_id: String,
    ) -> Pin<Box<dyn Future<Output = Option<EventStoreMessages>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

Source

fn store_event<'life0, 'async_trait>( &'life0 self, session_id: String, stream_id: String, time_stamp: u128, message: String, ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn remove_by_session_id<'life0, 'async_trait>( &'life0 self, session_id: String, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn remove_stream_in_session<'life0, 'async_trait>( &'life0 self, session_id: String, stream_id: String, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn clear<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn events_after<'life0, 'async_trait>( &'life0 self, last_event_id: String, ) -> Pin<Box<dyn Future<Output = Option<EventStoreMessages>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Implementors§