pub fn future_to_promise<F>(future: F) -> Promise
where
    F: Future<Item = JsValue, Error = JsValue> + 'static,
{
    _future_to_promise(Box::new(future))
}
/// Converts a Rust `Future` into a JavaScript `Promise`.
///
/// This function will take any future in Rust and schedule it to be executed,
/// returning a JavaScript `Promise` which can then be passed back to JavaScript
/// to get plumbed into the rest of a system.
///
/// The `future` provided must adhere to `'static` because it'll be scheduled
/// to run in the background and cannot contain any stack references. The
/// returned `Promise` will be resolved or rejected when the future completes,
/// depending on whether it finishes with `Ok` or `Err`.
///
/// # Panics
///
/// Note that in wasm panics are currently translated to aborts, but "abort" in
/// this case means that a JavaScript exception is thrown. The wasm module is
/// still usable (likely erroneously) after Rust panics.
///
/// If the `future` provided panics then the returned `Promise` **will not
/// resolve**. Instead it will be a leaked promise. This is an unfortunate
/// limitation of wasm currently that's hoped to be fixed one day!
Converts a Rust `Future` into a JavaScript `Promise`.
This function will take any future in Rust and schedule it to be executed,
returning a JavaScript `Promise` which can then be passed back to JavaScript
to get plumbed into the rest of a system.

The `future` provided must adhere to `'static` because it'll be scheduled
to run in the background and cannot contain any stack references.
Converts a Rust ` Future ` into a JavaScript ` Promise ` . This function will take any future in Rust and schedule it to be executed returning a JavaScript ` Promise ` which can then be passed back to JavaScript to get plumbed into the rest of a system . The ` future ` provided must adhere to ` ' static ` because it ' ll be scheduled to run in the background and cannot contain any stack references .
pub fn future_to_promise<F>(future: F) -> Promise
where
    F: Future<Item = JsValue, Error = JsValue> + 'static,
{
    _future_to_promise(Box::new(future))
}
pub fn future_to_promise < F > ( future : F ) -> Promise where F : Future < Item = JsValue , Error = JsValue > + ' static , { _future_to_promise ( Box :: new ( future ) ) }
Converts a Rust `Future` into a JavaScript `Promise`.
Converts a Rust ` Future ` into a JavaScript ` Promise ` .
future
F
future
F
panics
Note that in wasm panics are currently translated to aborts, but "abort" in
this case means that a JavaScript exception is thrown. The wasm module is
still usable (likely erroneously) after Rust panics.

If the `future` provided panics then the returned `Promise` **will not
resolve**. Instead it will be a leaked promise. This is an unfortunate
limitation of wasm currently that's hoped to be fixed one day!
Note that in wasm panics are currently translated to aborts but " abort " in this case means that a JavaScript exception is thrown . The wasm module is still usable ( likely erroneously ) after Rust panics . If the ` future ` provided panics then the returned ` Promise ` ** will not resolve ** . Instead it will be a leaked promise . This is an unfortunate limitation of wasm currently that ' s hoped to be fixed one day!