Struct eventually::event::store::Tracking
source · pub struct Tracking<T, StreamId, Event>{ /* private fields */ }
Expand description
Decorator type for an event::Store
implementation that tracks the list of
recorded Domain Events through it.
Useful for testing purposes, i.e. asserting that Domain Events written throguh this Event Store instance are the ones expected.
Implementations§
source§impl<T, StreamId, Event> Tracking<T, StreamId, Event>
impl<T, StreamId, Event> Tracking<T, StreamId, Event>
sourcepub fn recorded_events(&self) -> Vec<Persisted<StreamId, Event>>
pub fn recorded_events(&self) -> Vec<Persisted<StreamId, Event>>
sourcepub fn reset_recorded_events(&self)
pub fn reset_recorded_events(&self)
Trait Implementations§
source§impl<T, StreamId, Event> Appender<StreamId, Event> for Tracking<T, StreamId, Event>
impl<T, StreamId, Event> Appender<StreamId, Event> for Tracking<T, StreamId, Event>
source§fn append<'life0, 'async_trait>(
&'life0 self,
id: StreamId,
version_check: Check,
events: Vec<Envelope<Event>>
) -> Pin<Box<dyn Future<Output = Result<Version, AppendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
id: StreamId,
version_check: Check,
events: Vec<Envelope<Event>>
) -> Pin<Box<dyn Future<Output = Result<Version, AppendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Appens new Domain Events to the specified Event Stream. Read more
Auto Trait Implementations§
impl<T, StreamId, Event> RefUnwindSafe for Tracking<T, StreamId, Event>where
T: RefUnwindSafe,
impl<T, StreamId, Event> Send for Tracking<T, StreamId, Event>
impl<T, StreamId, Event> Sync for Tracking<T, StreamId, Event>
impl<T, StreamId, Event> Unpin for Tracking<T, StreamId, Event>where
T: Unpin,
impl<T, StreamId, Event> UnwindSafe for Tracking<T, StreamId, Event>where
T: UnwindSafe,
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, StreamId, Event> EventStoreExt<StreamId, Event> for T
impl<T, StreamId, Event> EventStoreExt<StreamId, Event> for T
source§fn with_tracing(self) -> InstrumentedEventStore<Self, StreamId, Event>
fn with_tracing(self) -> InstrumentedEventStore<Self, StreamId, Event>
Returns an instrumented version of the
event::Store
instance.source§impl<T, StreamId, Event> EventStoreExt<StreamId, Event> for T
impl<T, StreamId, Event> EventStoreExt<StreamId, Event> for T
source§fn with_recorded_events_tracking(self) -> Tracking<Self, StreamId, Event>
fn with_recorded_events_tracking(self) -> Tracking<Self, StreamId, Event>
Returns a
Tracking
instance that decorates the original event::Store
instanca this method has been called on.