pub struct JsBoolean(/* private fields */);👎Deprecated since 3.0.0:
use bool instead
Implementations§
Source§impl JsBoolean
impl JsBoolean
pub fn into_unknown<'env>(self) -> Unknown<'env>
pub fn coerce_to_bool(self) -> Result<JsBoolean>
pub fn coerce_to_number<'env>(self) -> Result<JsNumber<'env>>
pub fn coerce_to_string<'env>(self) -> Result<JsString<'env>>
pub fn coerce_to_object(self) -> Result<JsObject>
pub fn is_date(&self) -> Result<bool>
pub fn is_promise(&self) -> Result<bool>
pub fn is_error(&self) -> Result<bool>
pub fn is_typedarray(&self) -> Result<bool>
pub fn is_dataview(&self) -> Result<bool>
pub fn is_array(&self) -> Result<bool>
pub fn is_buffer(&self) -> Result<bool>
pub fn is_arraybuffer(&self) -> Result<bool>
pub fn instanceof<Constructor>(&self, constructor: Constructor) -> Result<bool>where
Constructor: NapiRaw,
Trait Implementations§
impl Copy for JsBoolean
Source§impl NapiValue for JsBoolean
impl NapiValue for JsBoolean
unsafe fn from_raw(env: napi_env, value: napi_value) -> Result<JsBoolean>
unsafe fn from_raw_unchecked(env: napi_env, value: napi_value) -> JsBoolean
Source§impl ToNapiValue for JsBoolean
impl ToNapiValue for JsBoolean
Source§unsafe fn to_napi_value(_: napi_env, value: Self) -> Result<napi_value>
unsafe fn to_napi_value(_: napi_env, value: Self) -> Result<napi_value>
This function called to convert rust values to napi values Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>>
Source§impl ValidateNapiValue for JsBoolean
impl ValidateNapiValue for JsBoolean
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
This function called to validate whether napi value passed to rust is valid type. Read more
Auto Trait Implementations§
impl !Send for JsBoolean
impl !Sync for JsBoolean
impl Freeze for JsBoolean
impl RefUnwindSafe for JsBoolean
impl Unpin for JsBoolean
impl UnsafeUnpin for JsBoolean
impl UnwindSafe for JsBoolean
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more