pub struct InMemoryMobEventStore { /* private fields */ }Expand description
In-memory event store for tests and ephemeral mobs.
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryMobEventStore
impl Debug for InMemoryMobEventStore
Source§impl Default for InMemoryMobEventStore
impl Default for InMemoryMobEventStore
Source§fn default() -> InMemoryMobEventStore
fn default() -> InMemoryMobEventStore
Returns the “default value” for a type. Read more
Source§impl MobEventStore for InMemoryMobEventStore
impl MobEventStore for InMemoryMobEventStore
Source§fn append<'life0, 'async_trait>(
&'life0 self,
event: NewMobEvent,
) -> Pin<Box<dyn Future<Output = Result<MobEvent, MobStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
event: NewMobEvent,
) -> Pin<Box<dyn Future<Output = Result<MobEvent, MobStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append a new event to the store.
Source§fn append_batch<'life0, 'async_trait>(
&'life0 self,
batch: Vec<NewMobEvent>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MobEvent>, MobStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append_batch<'life0, 'async_trait>(
&'life0 self,
batch: Vec<NewMobEvent>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MobEvent>, MobStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append multiple events atomically. Read more
Source§fn poll<'life0, 'async_trait>(
&'life0 self,
after_cursor: u64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MobEvent>, MobStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn poll<'life0, 'async_trait>(
&'life0 self,
after_cursor: u64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MobEvent>, MobStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Poll for events after a given cursor, up to a limit.
Source§fn replay_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MobEvent>, MobStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn replay_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MobEvent>, MobStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Replay all events from the beginning.
Auto Trait Implementations§
impl Freeze for InMemoryMobEventStore
impl !RefUnwindSafe for InMemoryMobEventStore
impl Send for InMemoryMobEventStore
impl Sync for InMemoryMobEventStore
impl Unpin for InMemoryMobEventStore
impl UnsafeUnpin for InMemoryMobEventStore
impl !UnwindSafe for InMemoryMobEventStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more