Trait odbc_api::Sleep

source ·
pub trait Sleep {
    type Poll: Future;

    fn next_poll(&mut self) -> Self::Poll;
}
Expand description

Governs the behaviour of of polling in async functions.

There is a generic implementation for any function retuning a future. This allows e.g. to pass || tokio::time::sleep(Duration::from_millis(50)) to functions expecting sleep. That is if you use tokio as your async runtime, of course.

Required Associated Types§

Required Methods§

Between each poll next poll is executed, and the resulting future is awaited.

Implementors§