pub struct JsBoolean(/* private fields */);
Expand description
The type of JavaScript Boolean primitives.
§Example
// Extract the console.log function:
let console: Handle<JsObject> = cx.global("console")?;
let log: Handle<JsFunction> = console.get(&mut cx, "log")?;
// The two Boolean values:
let t = cx.boolean(true);
let f = cx.boolean(false);
// Call console.log(true, false):
log.call_with(&cx).arg(t).arg(f).exec(&mut cx)?;
Implementations§
Trait Implementations§
source§impl Value for JsBoolean
impl Value for JsBoolean
Auto Trait Implementations§
impl Freeze for JsBoolean
impl RefUnwindSafe for JsBoolean
impl !Send for JsBoolean
impl !Sync for JsBoolean
impl Unpin 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