Function rtx::timeout::run_with_timeout

source ·
pub fn run_with_timeout<F, T>(f: F, timeout: Duration) -> Result<T>where
    F: FnOnce() -> Result<T> + Send + 'static,
    T: Send + 'static,