Skip to main content

run_detached

Function run_detached 

Source
pub fn run_detached<F, T>(
    future: F,
) -> impl Future<Output = Result<T, DetachedError>> + MaybeSend + 'static
where F: Future<Output = T> + MaybeSend + 'static, T: MaybeSend + 'static,
Expand description

Start future on the current executor now and return a future of its output.

Post: the returned future yields Unavailable at once when no executor is current; otherwise Spawner::run_detached’s ownership law holds.