pub trait IntoTimeout: Future + Sized {
    fn timeout(self, timeout: Duration) -> Timeout<Self>  { ... }
}
Expand description

Futures implementing this trait can be constrained with a timeout (see Timeout).

NOTE: this trait is implemented for all type implementing std::future::Future, but it must be used only with futures from crate::fiber::async otherwise the behaviour is undefined.

Provided Methods§

Adds timeout to a future. See Timeout.

Implementors§