pub struct EventEmitter { /* private fields */ }Expand description
A simple event emitter that allows subscribing to and emitting events.
This implementation uses async channels to dispatch events to subscribers asynchronously without blocking the emitter.
Implementations§
Source§impl EventEmitter
impl EventEmitter
Sourcepub async fn emit(&self, event: AnySolverEvent)
pub async fn emit(&self, event: AnySolverEvent)
Emit an event to all subscribers asynchronously.
Events are dispatched to subscribers without blocking the emitter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventEmitter
impl !RefUnwindSafe for EventEmitter
impl Send for EventEmitter
impl Sync for EventEmitter
impl Unpin for EventEmitter
impl !UnwindSafe for EventEmitter
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