pub struct EventBus { /* private fields */ }Expand description
The central event bus for Cortex.
All components emit events through this bus. Consumers subscribe to receive a stream of all events.
Implementations§
Source§impl EventBus
impl EventBus
Sourcepub fn emit(&self, event: CortexEvent)
pub fn emit(&self, event: CortexEvent)
Emit an event to all subscribers. Silently ignores if no subscribers.
Sourcepub fn subscribe(&self) -> Receiver<CortexEvent>
pub fn subscribe(&self) -> Receiver<CortexEvent>
Subscribe to receive all future events.
Auto Trait Implementations§
impl Freeze for EventBus
impl !RefUnwindSafe for EventBus
impl Send for EventBus
impl Sync for EventBus
impl Unpin for EventBus
impl UnsafeUnpin for EventBus
impl !UnwindSafe for EventBus
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