pub unsafe extern "C" fn napi_wrap_sendable_with_size(
env: napi_env,
js_object: napi_value,
native_object: *mut c_void,
finalize_cb: napi_finalize,
finalize_hint: *mut c_void,
native_binding_size: usize,
) -> napi_statusAvailable on crate features
napi and api-12 only.Expand description
Wraps a native instance in an ArkTS object.
§Arguments
-
env- The environment that the API is invoked under. -
js_object- The ArkTS object that will be the wrapper for the native object. -
native_object- The native instance that will be wrapped in the ArkTS object. -
finalize_cb- Optional native callback that can be used to free the native instance when the ArkTS object has been garbage-collected. -
finalize_hint- Optional contextual hint that is passed to the finalize callback. -
native_binding_size- The size of native binding.
§Returns
- Return the function execution status.
Available since API-level: 12