[][src]Function futurify::wrap

pub fn wrap<T: Send + 'static, F: FnOnce() -> T + Send + 'static + Unpin>(
    wrapped: F
) -> Futurified<T, F>

Wraps a closure to be executed in a separate thread. It will be executed once the returning Future is polled.

The Future will return whatever the closure returns.