pub trait Runtime {
type Sleep: Sleep;
type Instant: Instant;
// Required methods
fn create_sleep(&self, timeout: Duration) -> Self::Sleep;
fn now(&self) -> Self::Instant;
}
Expand description
Async runtime
Required Associated Types§
Required Methods§
Sourcefn create_sleep(&self, timeout: Duration) -> Self::Sleep
fn create_sleep(&self, timeout: Duration) -> Self::Sleep
Create a new sleep future with given timeout