pub struct WeakGc<T: Trace + ?Sized + 'static> { /* private fields */ }
Expand description
A weak reference to a Gc
.
This type allows keeping references to Gc
managed values without keeping them alive for
garbage collections. However, this also means WeakGc::upgrade
could return None
at any moment.
Implementations§
Trait Implementations§
source§impl<T: Trace> PartialEq for WeakGc<T>
impl<T: Trace> PartialEq for WeakGc<T>
source§impl<T: Trace + ?Sized + 'static> Trace for WeakGc<T>
impl<T: Trace + ?Sized + 'static> Trace for WeakGc<T>
source§unsafe fn trace_non_roots(&self)
unsafe fn trace_non_roots(&self)
Trace handles located in GC heap, and mark them as non root. Read more
source§fn run_finalizer(&self)
fn run_finalizer(&self)
Runs
Finalize::finalize
on this object and all
contained subobjects.impl<T: Trace> Eq for WeakGc<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for WeakGc<T>
impl<T> !Send for WeakGc<T>
impl<T> !Sync for WeakGc<T>
impl<T: ?Sized> Unpin for WeakGc<T>
impl<T> !UnwindSafe for WeakGc<T>
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