napi_get_boolean

Function napi_get_boolean 

Source
pub unsafe extern "C" fn napi_get_boolean(
    env: napi_env,
    value: bool,
    result: *mut napi_value,
) -> napi_status
Available on crate feature napi only.
Expand description

Obtains the ArkTS singleton value corresponding to given C primitive boolean value.

§Arguments

  • env - Current running virtual machine context.

  • value - C primitive boolean value.

  • result - The ArkTS singleton value equivalent of C primitive boolean value.

§Returns

  • Returns the function execution status. [napi_ok] If the function executed successfully.

[napi_invalid_arg] If the param env and(or) result is nullptr.

Available since API-level: 10