pub struct BootstrapScope { /* private fields */ }Expand description
RAII handle for a heap bootstrap window; created by
Heap::bootstrap_scope, ends the window on drop. Exists so error paths
(? during stdlib install, lua_open failure) cannot leave the heap
stuck in bootstrap mode the way a manual end_bootstrap call can.
Sound with no lifetime and no unsafe: the scope shares ownership of the
heap’s depth counter (Rc<Cell<usize>>), so a scope that outlives its
heap decrements a still-live cell instead of dereferencing a dead heap —
the count on a dead heap is meaningless but harmless. (Contrast with
HeapGuard::push’s raw-pointer contract, tracked for the same
treatment in the heap-ownership follow-up.)
Trait Implementations§
Source§impl Drop for BootstrapScope
impl Drop for BootstrapScope
Auto Trait Implementations§
impl !RefUnwindSafe for BootstrapScope
impl !Send for BootstrapScope
impl !Sync for BootstrapScope
impl !UnwindSafe for BootstrapScope
impl Freeze for BootstrapScope
impl Unpin for BootstrapScope
impl UnsafeUnpin for BootstrapScope
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