Function freya::prelude::use_future

pub fn use_future<F>(future: impl FnMut() -> F + 'static) -> UseFuture
where F: Future + 'static,
Expand description

A hook that allows you to spawn a future

The future is spawned on the next call to flush_sync which means that it will not run on the server. To run a future on the server, you should use spawn directly.