pub trait EventStore {
// Required methods
fn publish<E: Event>(
&mut self,
stream_id: EventStreamId,
events: Vec<E>,
expected_version: Option<EventStreamVersion>,
) -> impl Future<Output = Result<(), Error>> + Send;
fn read_stream<E: Event>(
&self,
stream_id: EventStreamId,
) -> impl Future<Output = Result<EventStream<E>, Error>> + Send;
}Required Methods§
fn publish<E: Event>( &mut self, stream_id: EventStreamId, events: Vec<E>, expected_version: Option<EventStreamVersion>, ) -> impl Future<Output = Result<(), Error>> + Send
fn read_stream<E: Event>( &self, stream_id: EventStreamId, ) -> impl Future<Output = Result<EventStream<E>, Error>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.