pub unsafe extern "C" fn napi_detach_arraybuffer(
env: napi_env,
arraybuffer: napi_value,
) -> napi_statusAvailable on crate feature
napi only.Expand description
Detaches the underlying data from an ‘ArrayBuffer’ object. After the data is detached, you can operate the data in C/C++.
§Arguments
-
env- Current running virtual machine context. -
arraybuffer- ArkTS ArrayBuffer object.
§Returns
- Returns the function execution status.
[
napi_ok] If the function executed successfully.
[napi_invalid_arg] If env or arraybuffer is nullptr, if ‘arraybuffer’ is not an ArrayBuffer object.
[napi_object_expected] If the ‘arraybuffer’ is not an ArkTS object.
Available since API-level: 10