wasm-bindgen/src
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
..
cache Fixing CI build error 2019-07-19 23:32:58 +02:00
convert Run cargo fmt over all code 2019-08-12 11:28:37 -07:00
anyref.rs Correct base calculation in anyref allocator 2019-08-01 12:00:33 -07:00
cast.rs Touch up descriptions of has_type 2019-04-12 10:54:36 -07:00
closure.rs Remove the long-defunkt Stack trait 2019-06-25 05:08:50 -07:00
describe.rs Run cargo fmt over all code 2019-08-12 11:28:37 -07:00
lib.rs Add support for #[wasm_bindgen] on async fn (#1754) 2019-09-06 13:47:16 -05:00