pub struct ShadowFrameGuard { /* private fields */ }Expand description
A frame claimed from Rust, released when dropped.
The RAII shape is what makes “write past your frame” unrepresentable from
Rust: Self::set and Self::clear are bounds-checked against the width
the frame was pushed with, and the only way to restore top is to drop the
guard — so a frame cannot outlive its slots or be popped twice.
Implementations§
Source§impl ShadowFrameGuard
impl ShadowFrameGuard
Sourcepub fn set(&mut self, index: usize, r: GcRef)
pub fn set(&mut self, index: usize, r: GcRef)
Root r in slot index.
§Panics
If index is outside the frame. Writing another frame’s slot would make
the collector’s view of that frame wrong, which is not a condition the
caller could detect afterwards.
Trait Implementations§
Source§impl Drop for ShadowFrameGuard
impl Drop for ShadowFrameGuard
Auto Trait Implementations§
impl !RefUnwindSafe for ShadowFrameGuard
impl !Send for ShadowFrameGuard
impl !Sync for ShadowFrameGuard
impl !UnwindSafe for ShadowFrameGuard
impl Freeze for ShadowFrameGuard
impl Unpin for ShadowFrameGuard
impl UnsafeUnpin for ShadowFrameGuard
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