pub fn with_timeout<F, T>(timeout: Duration, work: F) -> Result<T, ExecError>Expand description
Run work on a worker thread; return its result or
Err(ExecError::Timeout) if it doesn’t finish within timeout.
work must be 'static + Send so it can move to the worker. Pass
owned data in (clone if needed) — borrowing across the boundary
would force 'static lifetimes everywhere upstream.