pub struct CollectingHandler<E: DomainEvent> { /* private fields */ }Expand description
A handler that collects events for testing
Implementations§
Source§impl<E: DomainEvent> CollectingHandler<E>
impl<E: DomainEvent> CollectingHandler<E>
Trait Implementations§
Source§impl<E: Default + DomainEvent> Default for CollectingHandler<E>
impl<E: Default + DomainEvent> Default for CollectingHandler<E>
Source§impl<E: DomainEvent> EventHandler<E> for CollectingHandler<E>
impl<E: DomainEvent> EventHandler<E> for CollectingHandler<E>
Source§fn handle<'life0, 'async_trait>(
&'life0 self,
envelope: EventEnvelope<E>,
) -> Pin<Box<dyn Future<Output = Result<(), EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
envelope: EventEnvelope<E>,
) -> Pin<Box<dyn Future<Output = Result<(), EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a domain event Read more
Source§fn event_types(&self) -> Vec<&'static str>
fn event_types(&self) -> Vec<&'static str>
Event types this handler is interested in Read more
Source§fn should_retry(&self) -> bool
fn should_retry(&self) -> bool
Whether this handler should be retried on failure
Source§fn max_retries(&self) -> u32
fn max_retries(&self) -> u32
Maximum retry attempts
Auto Trait Implementations§
impl<E> !RefUnwindSafe for CollectingHandler<E>
impl<E> !UnwindSafe for CollectingHandler<E>
impl<E> Freeze for CollectingHandler<E>
impl<E> Send for CollectingHandler<E>
impl<E> Sync for CollectingHandler<E>
impl<E> Unpin for CollectingHandler<E>
impl<E> UnsafeUnpin for CollectingHandler<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