Fusuma

Components / Work

work

future as a piece of work (see Program::perform).

future as a piece of work (see Program::perform).

A Program hands it to Program::perform; the runner polls it on the app's clock and sends its answer to update.

Signature

pub fn work<M>(future: impl Future<Output = M> + 'static) -> Work<M>

Example

use fusuma::work;
// Work is any future that ends with a message.
let _job = work(async { "done" });

All components · Source