pub struct ValueBox { /* private fields */ }Expand description
One engine Value in a block whose payload pointer is also a JSValue.
The layout is load-bearing: header.ref_count sits at +4 and value at +8, so
JS_VALUE_GET_PTR(v) - 4 addresses the count, and free_value recovers the Value
from the payload pointer alone. Both offsets are asserted at compile time by the
offset_of! lines above, and again from the C side of the arithmetic in
tests/abi.rs.
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ValueBox
impl !Send for ValueBox
impl !Sync for ValueBox
impl !UnwindSafe for ValueBox
impl Forget for ValueBox
impl Freeze for ValueBox
impl Move for ValueBox
impl Unpin for ValueBox
impl UnsafeUnpin for ValueBoxwhere
*const GcBox<JsString> is !null: UnsafeUnpin,
*const GcBox<JsObject> is !null: UnsafeUnpin,
*const GcBox<JsSymbol> is !null: UnsafeUnpin,
*const GcBox<BigInt> is !null: UnsafeUnpin,
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