wasm-bindgen/guide
Alex Crichton 88618116ac
Add support for #[wasm_bindgen] on async fn (#1754)
This commit adds support to attach `#[wasm_bindgen]` on an `async fn`
which will change the return value into a `Promise` in JS. This in
theory has the exact same semantics as an `async` function in JS where
you call it with all the arguments, nothing happens and you get a
promise back, and then later the promise actually resolves.

This commit also adds a helper trait, `IntoJsResult`, to allow `async`
functions with multiple kinds of return values instead of requiring
everything to be `Result<JsValue, JsValue>`.
2019-09-06 13:47:16 -05:00
..
_theme Add a "nightly only" warning to documentation 2019-03-07 07:48:26 -08:00
src Add support for #[wasm_bindgen] on async fn (#1754) 2019-09-06 13:47:16 -05:00
.gitignore guide: Add the wasm-bindgen guide 2018-06-19 12:05:27 -07:00
book.toml Update mdbook install 2019-06-19 13:49:57 -07:00