pub struct Gc<T: ?Sized> { /* private fields */ }Expand description
A GC-managed pointer. Copy + Clone (one-machine-word). Replaces GcRef<T>.
Implementations§
Source§impl<T: Trace + 'static> Gc<T>
impl<T: Trace + 'static> Gc<T>
Sourcepub fn new_uncollected(value: T) -> Self
pub fn new_uncollected(value: T) -> Self
Allocate a GcBox<T> outside any heap registry. Used by legacy
GcRef::new call sites until Phase D-1b migrates them. The returned
Gc<T> is reachable only through the caller’s own retention path;
without joining a heap’s allgc chain, it will never be swept (so
effectively leaks until process exit — same as Rc behavior).
Trait Implementations§
Source§impl<T: Trace + 'static> Trace for Gc<T>
Gc<T> is itself traceable: marking it forwards to the contained T.
impl<T: Trace + 'static> Trace for Gc<T>
Gc<T> is itself traceable: marking it forwards to the contained T.
impl<T: ?Sized> Copy for Gc<T>
impl<T: ?Sized> Eq for Gc<T>
Auto Trait Implementations§
impl<T> Freeze for Gc<T>where
T: ?Sized,
impl<T> !RefUnwindSafe for Gc<T>
impl<T> !Send for Gc<T>
impl<T> !Sync for Gc<T>
impl<T> Unpin for Gc<T>
impl<T> UnsafeUnpin for Gc<T>where
T: ?Sized,
impl<T> !UnwindSafe for Gc<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