Trait chipset_device::poll_device::PollDevice

source ·
pub trait PollDevice {
    // Required method
    fn poll_device(&mut self, cx: &mut Context<'_>);
}
Expand description

Implemented by devices which register themselves to be polled whenever the associated waker is called.

Required Methods§

source

fn poll_device(&mut self, cx: &mut Context<'_>)

Poll the device for asynchronous work.

This is called asynchronously whenever the device enters the running state, and then whenever wake_by_ref is called on the waker passed in cx.waker().

The device will only be polled while in the running state. If the device is stopped, any wake events will be delayed until the device runs again.

Implementors§