Trait futures_timeout::TimeoutExt

source ·
pub trait TimeoutExt: Sized {
    // Provided method
    fn timeout(self, duration: Duration) -> Timeout<Self>  { ... }
}

Provided Methods§

source

fn timeout(self, duration: Duration) -> Timeout<Self>

Requires a Future or Stream to complete before the specific duration has elapsed.

Note: If a Stream returns an item, the timer will reset until Poll::Ready(None) is returned

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Sized> TimeoutExt for T