Function glfw::flush_messages [−][src]
pub fn flush_messages<'a, Message: Send>(
receiver: &'a Receiver<Message>
) -> FlushedMessages<'a, Message>ⓘNotable traits for FlushedMessages<'a, Message>
impl<'a, Message: 'static + Send> Iterator for FlushedMessages<'a, Message> type Item = Message;
Returns an iterator that yields until no more messages are contained in the
Receiver
’s queue. This is useful for event handling where the blocking
behaviour of Receiver::iter
is undesirable.
Example
ⓘ
for event in glfw::flush_messages(&events) { // handle event }