We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error[E0107]: method takes 1 generic argument but 2 generic arguments were supplied --> adapter/desktop-glue/src/js_account.rs:8:1 | 8 | #[napi(constructor)] | ^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument 9 | #[derive(Serialize, Deserialize, Default, Debug)] 10 | pub struct JsAccount { | --------- help: remove this generic argument | note: method defined here, with 1 generic parameter: T --> /Users/cddengcong/.cargo/registry/src/index.crates.io-6f17d22bba15001f/napi-2.14.1/src/bindgen_runtime/callback_info.rs:121:10 | 121 | pub fn construct<T: ObjectFinalize + 'static>( | ^^^^^^^^^ - = note: this error originates in the attribute macro napi (in Nightly builds, run with -Z macro-backtrace for more info)
T
napi
The text was updated successfully, but these errors were encountered:
#[napi] #[derive(Serialize, Deserialize, Default, Debug)] pub struct JsAccount { pub app: String, pub pin: String, }
#[napi] impl JsAccount { #[napi(constructor)] pub fn new(app: String, pin: String) -> Self { JsAccount { app: app, pin: pin } } }
still not work error information: method takes 1 generic argument but 2 generic arguments were supplied expected 1 generic argument
Sorry, something went wrong.
No branches or pull requests
error[E0107]: method takes 1 generic argument but 2 generic arguments were supplied
--> adapter/desktop-glue/src/js_account.rs:8:1
|
8 | #[napi(constructor)]
| ^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
9 | #[derive(Serialize, Deserialize, Default, Debug)]
10 | pub struct JsAccount {
| --------- help: remove this generic argument
|
note: method defined here, with 1 generic parameter:
T
--> /Users/cddengcong/.cargo/registry/src/index.crates.io-6f17d22bba15001f/napi-2.14.1/src/bindgen_runtime/callback_info.rs:121:10
|
121 | pub fn construct<T: ObjectFinalize + 'static>(
| ^^^^^^^^^ -
= note: this error originates in the attribute macro
napi
(in Nightly builds, run with -Z macro-backtrace for more info)The text was updated successfully, but these errors were encountered: