#[repr(transparent)]
pub struct JsBoolean(_);
Expand description
The type of JavaScript
Boolean
primitives.
let console: Handle<JsObject> = cx.global().get(&mut cx, "console")?;
let log: Handle<JsFunction> = console.get(&mut cx, "log")?;
let t = cx.boolean(true);
let f = cx.boolean(false);
log.call_with(&cx).arg(t).arg(f).exec(&mut cx)?;
Returns the value of this Boolean as a Rust bool
.
Formats the value using the given formatter.
Read more
Available on crate feature sys
only.
Get a raw reference to the wrapped Node-API value.
Available on crate feature sys
only.
Creates a value from a raw Node-API value.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.