denoland / denoland/deno_bindgen

Static Methods

Open
#151 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
320
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Are static methods in the plan for the future?
```rust
use deno_bindgen::deno_bindgen;

#[deno_bindgen]
struct Foo {

}
#[deno_bindgen]
impl Foo {
#[constructor]
pub fn new() -> Foo {
Self {}
}
pub fn bar(&self) -> String {
"Hello from Rust!".to_string()
}
}
```
```rust
#[deno_bindgen]
impl Foo {
pub fn baz() -> String {
"Hello from Rust!".to_string()
}

}
```
this code produces the following error:
```error
called `Result::unwrap()` on an `Err` value: MissingReceiver
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.