pub struct EventBus { /* private fields */ }Implementations§
Source§impl EventBus
impl EventBus
pub fn new() -> Self
pub fn publish(&self, event: ServerEvent)
pub fn subscribe(&self) -> Receiver<ServerEvent>
pub fn subscriber_count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for EventBus
impl !UnwindSafe for EventBus
impl Freeze for EventBus
impl Send for EventBus
impl Sync for EventBus
impl Unpin for EventBus
impl UnsafeUnpin 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