pub trait JSValue<'a>: Sized {
// Required method
fn convert_to_rust(
env: &'a JsEnv,
js_value: *mut napi_value__,
) -> Result<Self, NjError>;
// Provided method
fn label() -> &'static str { ... }
}
Expand description
Convert napi value to Rust value
Required Methods§
fn convert_to_rust( env: &'a JsEnv, js_value: *mut napi_value__, ) -> Result<Self, NjError>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.