pub unsafe extern "C" fn napi_set_instance_data(
env: napi_env,
data: *mut c_void,
finalize_cb: napi_finalize,
finalize_hint: *mut c_void,
) -> napi_statusAvailable on crate features
napi and api-11 only.Expand description
Associates data with the currently running environment.
§Arguments
-
env- Current running virtual machine context. -
data- Data item to bind with the ‘env’. -
finalize_cb- Optional native callback that will be triggered when ‘env’ is destroyed or this interface repeatedly calls. -
finalize_hint- Optional contextual hint that is passed to the finalize callback.
§Returns
- Returns the function execution status.
Available since API-level: 11