pub struct GcRef<'h, T: IntoHeapAllocation<'h>> { /* private fields */ }Implementations§
Source§impl<'h, T: IntoHeapAllocation<'h>> GcRef<'h, T>
impl<'h, T: IntoHeapAllocation<'h>> GcRef<'h, T>
Sourcepub unsafe fn new(p: Pointer<T::In>) -> GcRef<'h, T>
pub unsafe fn new(p: Pointer<T::In>) -> GcRef<'h, T>
Pin an object, returning a new GcRef that will unpin it when
dropped. Unsafe because if p is not a pointer to a live allocation of
type T::In — and a complete allocation, not a sub-object of one —
then later unsafe code will explode.
pub fn ptr(&self) -> Pointer<T::In>
pub fn as_ptr(&self) -> *const T::In
pub fn as_mut_ptr(&self) -> *mut T::In
Trait Implementations§
Source§impl<'h, T: IntoHeapAllocation<'h>> Clone for GcRef<'h, T>
impl<'h, T: IntoHeapAllocation<'h>> Clone for GcRef<'h, T>
Source§impl<'h, T: IntoHeapAllocation<'h>> Debug for GcRef<'h, T>
impl<'h, T: IntoHeapAllocation<'h>> Debug for GcRef<'h, T>
Source§impl<'h, T: IntoHeapAllocation<'h>> Drop for GcRef<'h, T>
impl<'h, T: IntoHeapAllocation<'h>> Drop for GcRef<'h, T>
Source§impl<'h, T: IntoHeapAllocation<'h>> PartialEq for GcRef<'h, T>
impl<'h, T: IntoHeapAllocation<'h>> PartialEq for GcRef<'h, T>
impl<'h, T: IntoHeapAllocation<'h>> Eq for GcRef<'h, T>
Auto Trait Implementations§
impl<'h, T> Freeze for GcRef<'h, T>
impl<'h, T> !RefUnwindSafe for GcRef<'h, T>
impl<'h, T> !Send for GcRef<'h, T>
impl<'h, T> !Sync for GcRef<'h, T>
impl<'h, T> Unpin for GcRef<'h, T>
impl<'h, T> !UnwindSafe for GcRef<'h, 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