napi-rs / napi-rs/website

Feedback for “Class”

Open
#72 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
MDX
Stars
25
Forks
48
Avg merge
3d 22h
Merged PRs (30d)
7

Description

I'm trying to use napi-rs at the moment for a project and I'm generally very impressed and grateful for what you have created.

Yesterday I had the experience of getting quite confused about an error which said

the trait NapiValue is not implemented for MyValue

And I couldn't see anything about MyValue that would be causing the problem given how I was setting it up. It turned out that I had another struct with #[napi] which had a pub value: MyValue field and it was the pub that was triggering the error. It never should have been pub but I guess I typed it accidentally at some point. I realise it is hard to control the kind of errors that the compiler produces in this situation but I'm wondering if the docs could be extended to include a section about pub fields and their implications and the kind of error that I ran into.

I would be happy to try to provide some text or a PR if that would be useful.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the documentation section for “Class” and review how fields are currently explained. Add guidance about pub fields, their implications, and the NapiValue error described in the issue; done means a reader can understand why an accidental pub field causes this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.