Skip to main content

EventLog

Trait EventLog 

Source
pub trait EventLog: EventReader {
    // Required methods
    fn append<'life0, 'async_trait>(
        &'life0 self,
        request: EventRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Event, EventLogError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn durability(&self) -> EventDurability;
}
Expand description

A coherent canonical event log.

Implementations explicitly pair their reader and writer and guarantee read-your-accepted-writes, unique monotonic per-session sequences, and the declared durability class. There is deliberately no blanket implementation.

Required Methods§

Source

fn append<'life0, 'async_trait>( &'life0 self, request: EventRequest, ) -> Pin<Box<dyn Future<Output = Result<Event, EventLogError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Commit a durable request, assigning its event id and persisted sequence.

Source

fn durability(&self) -> EventDurability

Persistence guarantee used for acknowledged appends.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§