Is there a way to use a wasm_bindgen::closure to run async code inside of it? #3889
-
I have the code shown below. Is there another way to build an async closure so I can run async code?
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The problem is that it's not async but needs to be? You can always use spawn local in WASM to run async code on the browser's async task queue. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Clone the client again before the second move? edit: If it's still not completley clear, the closure is a generator for futures which are sent to the browsers async queue. |
Beta Was this translation helpful? Give feedback.
Clone the client again before the second move?
edit: If it's still not completley clear, the closure is a generator for futures which are sent to the browsers async queue.