Struct cell_gc::GcRef
[−]
[src]
pub struct GcRef<'h, T: IntoHeapAllocation<'h>> { /* fields omitted */ }
Methods
impl<'h, T: IntoHeapAllocation<'h>> GcRef<'h, T>
[src]
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.
fn ptr(&self) -> Pointer<T::In>
fn as_ptr(&self) -> *const T::In
fn as_mut_ptr(&self) -> *mut T::In
Trait Implementations
impl<'h, T: IntoHeapAllocation<'h>> Drop for GcRef<'h, T>
[src]
impl<'h, T: IntoHeapAllocation<'h>> Clone for GcRef<'h, T>
[src]
fn clone(&self) -> GcRef<'h, T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'h, T: IntoHeapAllocation<'h>> Debug for GcRef<'h, T>
[src]
impl<'h, T: IntoHeapAllocation<'h>> PartialEq for GcRef<'h, T>
[src]
fn eq(&self, other: &GcRef<'h, T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.