pub struct SharedEventBroadcaster { /* private fields */ }Expand description
Shared event broadcasting state that persists across client clones
Implementations§
Sourcepub fn broadcast_event(&self, event: ClientEvent)
pub fn broadcast_event(&self, event: ClientEvent)
Broadcast an event to all subscribers
Sourcepub fn subscribe(&self) -> ClientEventReceiver
pub fn subscribe(&self) -> ClientEventReceiver
Subscribe to events
Sourcepub fn latest_event(&self) -> Option<ClientEvent>
pub fn latest_event(&self) -> Option<ClientEvent>
Get the latest event
Trait Implementations§
Source§fn clone(&self) -> SharedEventBroadcaster
fn clone(&self) -> SharedEventBroadcaster
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 moreAuto Trait Implementations§
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