pub struct Cell { /* private fields */ }Expand description
A mutable binding cell, shared between closures.
A variable that a closure captures cannot live in a stack slot, because the
slot dies with the frame while the closure outlives it. The compiler marks such
bindings is_captured and counts them in var_ref_count; the interpreter
allocates one of these per captured binding on entry, and every access — from
the owning frame or from any closure — goes through the cell.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Cell
impl !RefUnwindSafe for Cell
impl !Send for Cell
impl !Sync for Cell
impl !UnwindSafe for Cell
impl Forget for Cell
impl Move for Cell
impl Unpin for Cell
impl UnsafeUnpin for Cellwhere
*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