pub trait Driver {
// Required method
fn poll(
&mut self,
now: Instant,
waiter: &Waiter,
) -> Result<Option<Instant>, Error>;
}Expand description
A state machine polled with caller-supplied time.
Each poll advances the driver to now, processes ready work, and registers
waiter for external activity. Ok(Some(at)) asks to be polled again by
at (or sooner, on a wake); Ok(None) means only external activity can
make progress. Err is terminal: the driver has finished and must not be
polled again. A clean finish is Error::Closed.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".