pub fn task_with_timeout<M, F>(timeout: Duration, f: F, on_timeout: M) -> Cmd<M>Expand description
Create a Cmd::Task that enforces a cooperative timeout.
The worker closure receives a CancellationToken and must honor it for
timely timeout teardown. On timeout, the runtime requests cancellation and
returns on_timeout; any late worker result is discarded.