pub struct EventDispatcher { /* private fields */ }
Implementations§
Source§impl EventDispatcher
impl EventDispatcher
pub fn new() -> Self
Sourcepub fn add_broadcaster(&self, broadcaster: Arc<dyn EventBroadcaster>)
pub fn add_broadcaster(&self, broadcaster: Arc<dyn EventBroadcaster>)
Add a broadcaster (supports dynamic addition with interior mutability)
pub async fn dispatch(&self, event: AgentEvent)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EventDispatcher
impl RefUnwindSafe for EventDispatcher
impl Send for EventDispatcher
impl Sync for EventDispatcher
impl Unpin for EventDispatcher
impl UnwindSafe for EventDispatcher
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