pub struct Subscriber { /* private fields */ }Expand description
Implementations§
Source§impl Subscriber
impl Subscriber
Sourcepub async fn recv(&mut self) -> Option<GameEvent>
pub async fn recv(&mut self) -> Option<GameEvent>
Receives the next GameEvent, waiting asynchronously.
If the subscriber has fallen behind, the lagged messages are skipped, a warning is logged, and the next available event is returned.
Returns None if the sender (event bus) has been dropped and
there are no more buffered messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Subscriber
impl RefUnwindSafe for Subscriber
impl Send for Subscriber
impl Sync for Subscriber
impl Unpin for Subscriber
impl UnsafeUnpin for Subscriber
impl UnwindSafe for Subscriber
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