pub struct Gc<'b, T: ?Sized>(/* private fields */);Expand description
A thin, copyable, garbage collected pointer type.
Implementations§
Source§impl<'b, T: ?Sized> Gc<'b, T>
impl<'b, T: ?Sized> Gc<'b, T>
pub fn write(&self) -> &Write<T>
pub fn unlock(&self) -> &T::Unlockedwhere
T: Unlock,
pub fn as_ptr(&self) -> *mut T
Sourcepub fn long_ref(&self) -> &'b T
pub fn long_ref(&self) -> &'b T
Returns a reference to the contained value, which lasts for as long as the current view is active.
pub fn downgrade(this: Gc<'b, T>) -> Weak<'b, T>
Trait Implementations§
Source§impl<T: ?Sized + Ord> Ord for Gc<'_, T>
impl<T: ?Sized + Ord> Ord for Gc<'_, T>
Source§impl<T: ?Sized + PartialOrd> PartialOrd for Gc<'_, T>
impl<T: ?Sized + PartialOrd> PartialOrd for Gc<'_, T>
impl<T: ?Sized> Copy for Gc<'_, T>
impl<T: ?Sized + Eq> Eq for Gc<'_, T>
Auto Trait Implementations§
impl<'b, T> Freeze for Gc<'b, T>where
T: ?Sized,
impl<'b, T> !RefUnwindSafe for Gc<'b, T>
impl<'b, T> !Send for Gc<'b, T>
impl<'b, T> !Sync for Gc<'b, T>
impl<'b, T> Unpin for Gc<'b, T>
impl<'b, T> !UnwindSafe for Gc<'b, 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