Expand description
Bridging the gap between Rust Futures and JavaScript Promises.
This crate is now a thin shim re-exporting from js_sys::futures.
The implementation has been moved into js-sys so that
js_sys::Promise can implement core::future::IntoFuture directly,
enabling promise.await without any wrapper type.
All public items (JsFuture, spawn_local, future_to_promise,
future_to_promise_typed) are re-exported unchanged for backwards
compatibility.
Re-exports§
pub use js_sys;pub use wasm_bindgen;
Modules§
- stream
- Converting JavaScript
AsyncIterators to RustStreams.
Structs§
- JsFuture
- A Rust
Futurebacked by a JavaScriptPromise.
Functions§
- future_
to_ promise - Converts a Rust
Futureinto a JavaScriptPromise. - future_
to_ promise_ typed - Converts a Rust
Futureinto a corresponding typed JavaScriptPromise<T>. - spawn_
local - Runs a Rust
Futureon the current thread.