Open kjvalencik opened 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.
neon::extract::TryFromJs
Allowing users to implement TryFromJs gives the power of cx.args() and automatic conversions in export macros to user defined types.
TryFromJs
cx.args()
Questions to answer prior to stabilization:
Error
TryIntoJs
Result<Self, Self::Error>: ResultExt
from_js
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 ofcx.args()
and automatic conversions in export macros to user defined types.Questions to answer prior to stabilization:
Error
type (e.g.,TryIntoJs
orResult<Self, Self::Error>: ResultExt
)?from_js
?