Function cosmic::iced_widget::runtime::task::oneshot

source ยท
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.