async_sleep::timeout

Function internal_timeout

Source
pub fn internal_timeout<SLEEP, T>(
    dur: Duration,
    future: T,
) -> impl Future<Output = Result<T::Output, (Duration, T)>>
where SLEEP: Sleepble, T: Future + Unpin,