Struct winit_main::EventReceiver [−][src]
pub struct EventReceiver(_);
Expand description
Handle for receiving events from the main event loop.
Unlike a raw std::sync::mpsc::Receiver
, this never returns error on
disconnection, because disconnection can only occur for a brief moment
between the main event loop beginning to shut down, and the process as a
whole exiting. Therefore, when this receives a disconnection error from
the underlying receiver, it enters an infinite sleep cycle as it waits for
the OS to kill the process.
Implementations
Receive an event, blocking until one is available.
Attempt to receive an event, blocking until one is available, or the
timeout
duration has passed.
Try to receive an event immediately, never blocking.
Iterator form of self.recv()
. Blocking iterator that never ends.