pub struct InMemoryEventStore { /* private fields */ }Expand description
In-memory event store: one log per run, seq assigned on append.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryEventStore
impl Default for InMemoryEventStore
Source§impl EventStore for InMemoryEventStore
impl EventStore for InMemoryEventStore
Source§fn append(&self, run_id: &RunId, events: &[Event]) -> Result<Seq, KernelError>
fn append(&self, run_id: &RunId, events: &[Event]) -> Result<Seq, KernelError>
Appends events for the given run. Returns the seq of the last written event (or an error).
Implementations must assign seqs if not present and guarantee atomicity.
Source§fn scan(
&self,
run_id: &RunId,
from: Seq,
) -> Result<Vec<SequencedEvent>, KernelError>
fn scan( &self, run_id: &RunId, from: Seq, ) -> Result<Vec<SequencedEvent>, KernelError>
Scans events for the run starting at
from (inclusive), in ascending seq order.Auto Trait Implementations§
impl !Freeze for InMemoryEventStore
impl RefUnwindSafe for InMemoryEventStore
impl Send for InMemoryEventStore
impl Sync for InMemoryEventStore
impl Unpin for InMemoryEventStore
impl UnsafeUnpin for InMemoryEventStore
impl UnwindSafe for InMemoryEventStore
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