Skip to content
New issue

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

Unseal TryFromJs trait #1026

Open
2 tasks
kjvalencik opened this issue Apr 1, 2024 · 0 comments
Open
2 tasks

Unseal TryFromJs trait #1026

kjvalencik opened this issue Apr 1, 2024 · 0 comments

Comments

@kjvalencik
Copy link
Member

The neon::extract::TryFromJs trait was introduced in #1024 as standardized and ergonomic way of extract Rust values from JavaScript.

Allowing users to implement TryFromJs gives the power of cx.args() and automatic conversions in export macros to user defined types.

Questions to answer prior to stabilization:

  • Should there be a trait bound on the Error type (e.g., TryIntoJs or Result<Self, Self::Error>: ResultExt)?
  • Should there be a default implementation for from_js?
@kjvalencik kjvalencik changed the title Stabilize TryFromJs and remove Sealed Unseal TryFromJs trait Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant