pub fn wrap<T: Send + 'static, F: FnOnce() -> T + Send + 'static, E: Error>(
    wrapped: F,
) -> Futurified<T, F, E> {
    let (tx, rx) = channel();
    Futurified {
        tx,
        rx,
        wrapped: Some(wrapped),
        is_running: false,
        error: std::marker::PhantomData,
    }
}
/// 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.
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.
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 .
pub fn wrap<T: Send + 'static, F: FnOnce() -> T + Send + 'static, E: Error>(
    wrapped: F,
) -> Futurified<T, F, E> {
    let (tx, rx) = channel();
    Futurified {
        tx,
        rx,
        wrapped: Some(wrapped),
        is_running: false,
        error: std::marker::PhantomData,
    }
}
pub fn wrap < T : Send + ' static , F : FnOnce ( ) -> T + Send + ' static , E : Error > ( wrapped : F , ) -> Futurified < T , F , E > { let ( tx , rx ) = channel ( ) ; Futurified { tx , rx , wrapped : Some ( wrapped ) , is_running : false , error : std :: marker :: PhantomData , } }
Wraps a closure to be executed in a separate thread.
Wraps a closure to be executed in a separate thread .
wrapped
F
wrapped
F