pub struct DebugAwareEventStore<E: EventStore> { /* private fields */ }Expand description
An EventStore that delegates to both a primary E: EventStore (owned)
and a shared Arc<DebugEventStore> for the debug protocol.
The primary store is accessed via &mut self (normal EventStore contract).
The debug store uses interior mutability (Mutex) so it can be shared with
the protocol handler.
Implementations§
Source§impl<E: EventStore> DebugAwareEventStore<E>
impl<E: EventStore> DebugAwareEventStore<E>
Sourcepub fn new(primary: E, debug_store: Arc<DebugEventStore>) -> Self
pub fn new(primary: E, debug_store: Arc<DebugEventStore>) -> Self
Creates a new DebugAwareEventStore.
Sourcepub fn primary_mut(&mut self) -> &mut E
pub fn primary_mut(&mut self) -> &mut E
Returns a mutable reference to the primary event store.
Sourcepub fn debug_store(&self) -> Arc<DebugEventStore>
pub fn debug_store(&self) -> Arc<DebugEventStore>
Returns a clone of the Arc<DebugEventStore>.
Trait Implementations§
Source§impl<E> Debug for DebugAwareEventStore<E>where
E: Debug + EventStore,
impl<E> Debug for DebugAwareEventStore<E>where
E: Debug + EventStore,
Source§impl<E: EventStore> Default for DebugAwareEventStore<E>
impl<E: EventStore> Default for DebugAwareEventStore<E>
Auto Trait Implementations§
impl<E> Freeze for DebugAwareEventStore<E>where
E: Freeze,
impl<E> RefUnwindSafe for DebugAwareEventStore<E>where
E: RefUnwindSafe,
impl<E> Send for DebugAwareEventStore<E>
impl<E> Sync for DebugAwareEventStore<E>where
E: Sync,
impl<E> Unpin for DebugAwareEventStore<E>where
E: Unpin,
impl<E> UnsafeUnpin for DebugAwareEventStore<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for DebugAwareEventStore<E>where
E: 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