pub struct InMemoryEventEmitter { /* private fields */ }Expand description
In-memory event emitter using broadcast channels
Useful for testing and local event distribution.
Implementations§
Trait Implementations§
Source§impl Clone for InMemoryEventEmitter
impl Clone for InMemoryEventEmitter
Source§fn clone(&self) -> InMemoryEventEmitter
fn clone(&self) -> InMemoryEventEmitter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryEventEmitter
impl Debug for InMemoryEventEmitter
Source§impl EventEmitter for InMemoryEventEmitter
impl EventEmitter for InMemoryEventEmitter
Source§fn emit<'life0, 'async_trait>(
&'life0 self,
event: Event,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn emit<'life0, 'async_trait>(
&'life0 self,
event: Event,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Emit an event to the transport
Source§fn emit_batch<'life0, 'async_trait>(
&'life0 self,
events: Vec<Event>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn emit_batch<'life0, 'async_trait>(
&'life0 self,
events: Vec<Event>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Emit multiple events
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Check if the emitter is enabled/active
Auto Trait Implementations§
impl Freeze for InMemoryEventEmitter
impl !RefUnwindSafe for InMemoryEventEmitter
impl Send for InMemoryEventEmitter
impl Sync for InMemoryEventEmitter
impl Unpin for InMemoryEventEmitter
impl !UnwindSafe for InMemoryEventEmitter
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