WakeableChannel

Trait WakeableChannel 

Source
pub trait WakeableChannel {
    // Required methods
    fn set_waker(&mut self, waker: Box<dyn EventLoopWaker>);
    fn clear_waker(&mut self);
    fn waker(&self) -> Option<&dyn EventLoopWaker>;
}
Expand description

A channel that can wake an event loop when messages arrive.

Required Methods§

Source

fn set_waker(&mut self, waker: Box<dyn EventLoopWaker>)

Set the event loop waker.

When messages arrive on this channel, the waker will be called to notify the event loop.

Source

fn clear_waker(&mut self)

Remove the waker.

Source

fn waker(&self) -> Option<&dyn EventLoopWaker>

Get a reference to the current waker, if any.

Implementors§