Function async_sleep::timeout::timeout

source ·
pub fn timeout<SLEEP, T>(
    dur: Duration,
    future: T
) -> impl Future<Output = Result<T::Output, Error>>where
    SLEEP: Sleepble,
    T: Future + Unpin,