Closed kaneruan closed 2 years ago
This is a poor error message that needs to be improved but the bug is that async
functions with self
must be self
-by-value, they can't have shared references.
@alexcrichton Are you have any idea to fix that? I I've been stuck here for a long time. 😭
As I mentioned the methods must be self
-by-value and the arguments can't have any references/lifetimes in them. Other than that I don't know what else to do.
thanks, I attempt to use Rc<RefCell<?>>
to solve them, but I meet new question. #2791 https://github.com/rustwasm/wasm-bindgen/issues/2791
God! It's difficult to solve by myself.
Summary
#[wasm_bindgen]
tell me*arg1
does not live long enough it's ok when i Comment out the#[wasm_bindgen]
and#[wasm_bindgen(constructor)]
; A clear and concise summary of your question.Additional Details
Provide any additional details here.