Skip to main content

task

Function task 

Source
pub fn task(fut: impl Future<Output = ()> + 'static) -> TaskHandle
Expand description

Spawn an async flow onto Day’s main-loop executor. This is the opt-in seam for actions that open modals or pickers: button.action(|| day::task(async move { … .await … })). The future is polled once before this returns; the returned handle can TaskHandle::abort it and is freely discardable.

Day API ↩ Guides· daybrite.dev