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§
Sourcefn 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 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.
Sourcefn durability(&self) -> EventDurability
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".