pub struct HeapRef { /* private fields */ }Expand description
A non-owning heap identity handle for weak references (issue #252):
holds a Weak<Heap>, so a GcWeak that outlives its heap answers
“does the heap still contain my target” with a plain false — after
sweep or after heap teardown, indistinguishably — instead of
dereferencing freed memory. No unsafe, no outlives contract.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HeapRef
impl !Send for HeapRef
impl !Sync for HeapRef
impl !UnwindSafe for HeapRef
impl Freeze for HeapRef
impl Unpin for HeapRef
impl UnsafeUnpin for HeapRef
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