pub trait Runtime {
    type Sleep: Sleep;
    type Instant: Instant;

    fn create_sleep(&self, timeout: Duration) -> Self::Sleep;
    fn now(&self) -> Self::Instant;
}
Expand description

Async runtime

Required Associated Types§

Sleep future type associated with this runtime

Instant type associated with this runtime

Required Methods§

Create a new sleep future with given timeout

Get current time

Implementors§