Skip to main content

EventStore

Trait EventStore 

Source
pub trait EventStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn append_event<'life0, 'async_trait>(
        &'life0 self,
        event: Event,
    ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn append_events<'life0, 'async_trait>(
        &'life0 self,
        events: Vec<Event>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<BatchWriteSummary>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_event<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Option<Event>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_events<'life0, 'async_trait>(
        &'life0 self,
        filter: EventFilter,
        page: PageRequest,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Page<Event>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn count_events<'life0, 'async_trait>(
        &'life0 self,
        filter: EventFilter,
    ) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

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

Source

fn append_events<'life0, 'async_trait>( &'life0 self, events: Vec<Event>, ) -> Pin<Box<dyn Future<Output = StorageResult<BatchWriteSummary>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_event<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = StorageResult<Option<Event>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_events<'life0, 'async_trait>( &'life0 self, filter: EventFilter, page: PageRequest, ) -> Pin<Box<dyn Future<Output = StorageResult<Page<Event>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn count_events<'life0, 'async_trait>( &'life0 self, filter: EventFilter, ) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§