1 2 3 4 5 6 7 8
use std::future::Future; pub trait Sleep<D, T>: Future { fn sleep(period: D) -> Self; fn sleep_until(time: T) -> Self; }