pub struct EventReceiver { /* private fields */ }
Expand description
The result of the start
function. This structure receives the messages
received by the message loop.
The message loop is automatically stopped when this structure is dropped.
Implementations§
Source§impl EventReceiver
impl EventReceiver
Sourcepub fn next_event(&self) -> Event
pub fn next_event(&self) -> Event
Blocks the current thread until an event is received.
Sourcepub fn next_event_timeout(&self, timeout: Duration) -> Option<Event>
pub fn next_event_timeout(&self, timeout: Duration) -> Option<Event>
Blocks the current thread until an event is received or the given duration is reached.
Sourcepub fn try_next_event(&self) -> Option<Event>
pub fn try_next_event(&self) -> Option<Event>
Tries to receive an event without blocking the thread.
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