neon-bindings / neon

Rust bindings for writing safe and fast native Node.js modules.
https://www.neon-bindings.com/
Apache License 2.0
7.98k stars 282 forks source link

Unseal `TryFromJs` trait #1026

Open kjvalencik opened 5 months ago

kjvalencik commented 5 months ago

The neon::extract::TryFromJs trait was introduced in https://github.com/neon-bindings/neon/pull/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: