pub struct AsyncEventStore { /* private fields */ }Expand description
Async event store with background writer thread.
Implementations§
Source§impl AsyncEventStore
impl AsyncEventStore
Sourcepub fn spawn() -> (Self, ReceiverHandle)
pub fn spawn() -> (Self, ReceiverHandle)
Spawn the background writer thread.
Sourcepub fn submit(&self, event: DomainEvent) -> Result<(), String>
pub fn submit(&self, event: DomainEvent) -> Result<(), String>
Submit an event for async persistence.
Sourcepub fn increment_sequence(&self) -> u64
pub fn increment_sequence(&self) -> u64
Increment the local sequence counter.
Auto Trait Implementations§
impl !Freeze for AsyncEventStore
impl RefUnwindSafe for AsyncEventStore
impl Send for AsyncEventStore
impl Sync for AsyncEventStore
impl Unpin for AsyncEventStore
impl UnsafeUnpin for AsyncEventStore
impl UnwindSafe for AsyncEventStore
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