pub struct Gc<T>where
T: Trace + 'static,{ /* private fields */ }Expand description
A strong, reference-counted handle to a heap value.
Gc<T> is a pointer-sized handle: cloning is cheap, Deref gives &T,
and the value is released as soon as the last handle is gone (cycles need
Heap::collect).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Gc<T>
impl<T> !Send for Gc<T>
impl<T> !Sync for Gc<T>
impl<T> !UnwindSafe for Gc<T>
impl<T> Forget for Gc<T>
impl<T> Freeze for Gc<T>
impl<T> Move for Gc<T>
impl<T> Unpin for Gc<T>
impl<T> UnsafeUnpin for Gc<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