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