Tags: wasm-bindgen/wasm-bindgen
Tags
Loosen JsFuture<T> bound to support Promise<Union> (#5149) Imported `async fn -> Union` failed to compile because `From<Promise<T>> for JsFuture<T>` required `T: JsGeneric`, which demands layout equivalence with `JsValue`. Dynamic-union enums are tagged Rust enums, not transparent newtypes around `JsValue`, so they cannot satisfy that bound. The closure shim that materialises the resolved value only needs `T::from_abi`, which is per-type ABI conversion — `T: FromWasmAbi` is the actual minimum.
PreviousNext