pub struct WeakGc<T>where
T: Trace + 'static,{ /* private fields */ }Expand description
A non-owning handle to a heap value.
Keeps the box header (but not the value) alive, so WeakGc::upgrade can
tell whether the value is still there. Weak handles are not traced: they do
not keep anything alive and they do not take part in cycle detection, which
is what WeakRef/WeakMap need.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for WeakGc<T>
impl<T> !Send for WeakGc<T>
impl<T> !Sync for WeakGc<T>
impl<T> !UnwindSafe for WeakGc<T>
impl<T> Forget for WeakGc<T>
impl<T> Freeze for WeakGc<T>
impl<T> Move for WeakGc<T>
impl<T> Unpin for WeakGc<T>
impl<T> UnsafeUnpin for WeakGc<T>where
NonNull<GcBox<T>>: 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