pub struct GcPtr<T: ?Sized> { /* private fields */ }
Implementations
sourceimpl<T: ?Sized> GcPtr<T>
impl<T: ?Sized> GcPtr<T>
sourcepub unsafe fn data(&self) -> &T
pub unsafe fn data(&self) -> &T
Get a reference to the GC’d data
Invariants: GcPtr must not be dangling
sourcepub unsafe fn is_unmanaged(&self) -> bool
pub unsafe fn is_unmanaged(&self) -> bool
Tell if this ptr is managed or not
Invariants: GcPtr must not be dangling
sourcepub unsafe fn deallocate(self)
pub unsafe fn deallocate(self)
Free the data behind this GcPtr
Invariants: GcPtr must not be dangling, must not be managed and must not be read again
Trait Implementations
impl<T: ?Sized> Copy for GcPtr<T>
impl<T: ?Sized + Send> Send for GcPtr<T>
impl<T: ?Sized + Sync> Sync for GcPtr<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for GcPtr<T>
impl<T: ?Sized> Unpin for GcPtr<T>
impl<T> !UnwindSafe for GcPtr<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more