Trait napi_h::bindgen_prelude::FromNapiValue
source · pub trait FromNapiValue: Sized {
// Required method
unsafe fn from_napi_value(
env: napi_env,
napi_val: napi_value
) -> Result<Self>;
// Provided method
fn from_unknown(value: JsUnknown) -> Result<Self> { ... }
}
Required Methods§
sourceunsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
§Safety
this function called to convert napi values to native rust values
Provided Methods§
fn from_unknown(value: JsUnknown) -> Result<Self>
Object Safety§
This trait is not object safe.