cosmic::iced::runtime::task

Function channel

source
pub fn channel<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 values fed to the mpsc::Sender.