Trait WithTimeout

Source
pub trait WithTimeout<T, E> {
    // Required method
    fn with_timeout(
        self,
        name: &'static str,
        timeout: Duration,
    ) -> impl Future<Output = Result<T>> + Send
       where Self: Future<Output = Result<T, E>>;
}

Required Methods§

Source

fn with_timeout( self, name: &'static str, timeout: Duration, ) -> impl Future<Output = Result<T>> + Send
where Self: Future<Output = Result<T, E>>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<F, T, E> WithTimeout<T, E> for F
where F: Future<Output = Result<T, E>> + Send, Error: From<E>,