pub struct EventReceiver { /* private fields */ }Expand description
Receiver handle for receiving events from an EventBus.
Implementations§
Source§impl EventReceiver
impl EventReceiver
Sourcepub async fn recv(&mut self) -> Option<CuenvEvent>
pub async fn recv(&mut self) -> Option<CuenvEvent>
Receive the next event.
Returns None if the bus has been dropped.
May skip events if the receiver falls behind.
Sourcepub fn try_recv(&mut self) -> Option<CuenvEvent>
pub fn try_recv(&mut self) -> Option<CuenvEvent>
Try to receive an event without waiting.
Returns None if no event is immediately available or the bus is closed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventReceiver
impl !RefUnwindSafe for EventReceiver
impl Send for EventReceiver
impl Sync for EventReceiver
impl Unpin for EventReceiver
impl !UnwindSafe for EventReceiver
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