pub fn oneshot<T>(f: impl FnOnce(Sender<T>) -> Action<T>) -> Task<T>where T: MaybeSend + 'static,
Creates a new Task that executes the Action returned by the closure and produces the value fed to the oneshot::Sender.
Task
Action
oneshot::Sender