pub struct EventReceiver { /* private fields */ }Expand description
Receiver handle for the event channel
EventReceiver is the consuming end of the event channel. The Presenter holds this handle and
reads events for rendering. Because the underlying channel is multi-producer single-consumer,
there is exactly one EventReceiver per channel.
EventReceiver is Send but not Sync, matching the semantics of
tokio::sync::mpsc::Receiver.
Implementations§
Source§impl EventReceiver
impl EventReceiver
Sourcepub async fn recv(&mut self) -> Option<Event>
pub async fn recv(&mut self) -> Option<Event>
Receives the next event from the channel
Returns None when all EventSenders have been dropped and the channel is empty.
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 UnsafeUnpin 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