pub struct MemoryEventStore<E> { /* private fields */ }Expand description
Append-only in-memory event store with optimistic concurrency checks.
Implementations§
Source§impl<E> MemoryEventStore<E>
impl<E> MemoryEventStore<E>
Trait Implementations§
Source§impl<E: Debug> Debug for MemoryEventStore<E>
impl<E: Debug> Debug for MemoryEventStore<E>
Source§impl<E> Default for MemoryEventStore<E>
impl<E> Default for MemoryEventStore<E>
Source§impl<E> EventStore<E> for MemoryEventStore<E>where
E: DomainEvent + Clone,
impl<E> EventStore<E> for MemoryEventStore<E>where
E: DomainEvent + Clone,
Source§fn append<'a>(
&'a self,
stream_id: &'a StreamId,
expected: ExpectedVersion,
events: Vec<EventEnvelope<E>>,
) -> BoxFuture<'a, SoapResult<AppendResult>>
fn append<'a>( &'a self, stream_id: &'a StreamId, expected: ExpectedVersion, events: Vec<EventEnvelope<E>>, ) -> BoxFuture<'a, SoapResult<AppendResult>>
Atomically appends events if the stream version expectation is met.
Source§fn load<'a>(
&'a self,
stream_id: &'a StreamId,
after: Option<StreamVersion>,
) -> BoxFuture<'a, SoapResult<Vec<RecordedEvent<E>>>>
fn load<'a>( &'a self, stream_id: &'a StreamId, after: Option<StreamVersion>, ) -> BoxFuture<'a, SoapResult<Vec<RecordedEvent<E>>>>
Loads a stream, optionally starting after a committed version.
Source§fn read_all(
&self,
after: Option<GlobalPosition>,
limit: usize,
) -> BoxFuture<'_, SoapResult<Vec<RecordedEvent<E>>>>
fn read_all( &self, after: Option<GlobalPosition>, limit: usize, ) -> BoxFuture<'_, SoapResult<Vec<RecordedEvent<E>>>>
Reads the global log strictly after a position, in ascending order.
Auto Trait Implementations§
impl<E> !Freeze for MemoryEventStore<E>
impl<E> RefUnwindSafe for MemoryEventStore<E>
impl<E> Send for MemoryEventStore<E>where
E: Send,
impl<E> Sync for MemoryEventStore<E>where
E: Send,
impl<E> Unpin for MemoryEventStore<E>where
E: Unpin,
impl<E> UnsafeUnpin for MemoryEventStore<E>
impl<E> UnwindSafe for MemoryEventStore<E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more