Struct gluon_vm::gc::GcPtr
[−]
[src]
pub struct GcPtr<T: ?Sized> { // some fields omitted }
A pointer to a garbage collected value.
It is only safe to access data through a GcPtr
if the value is rooted (stored in a place
where the garbage collector will find it during the mark phase).
Methods
impl<T: ?Sized> GcPtr<T>
[src]
unsafe fn as_mut(&mut self) -> &mut T
Unsafe as it is up to the caller to ensure that this pointer is not referenced somewhere else
unsafe fn from_raw(ptr: *const T) -> GcPtr<T>
Unsafe as ptr
must have been allocted by this garbage collector
fn generation(&self) -> usize
impl<'a, T: Traverseable + Send + Sync + 'a> GcPtr<T>
[src]
fn as_traverseable(self) -> GcPtr<Traverseable + Send + Sync + 'a>
Coerces self
to a Traverseable
trait object
impl GcPtr<str>
[src]
fn as_traverseable_string(self) -> GcPtr<Traverseable + Send + Sync>
Coerces self
to a Traverseable
trait object
Trait Implementations
impl<T: ?Sized + Send + Sync> Send for GcPtr<T>
[src]
impl<T: ?Sized + Send + Sync> Sync for GcPtr<T>
[src]
impl<T: ?Sized> Copy for GcPtr<T>
[src]
impl<T: ?Sized> Clone for GcPtr<T>
[src]
fn clone(&self) -> GcPtr<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<T: ?Sized> Deref for GcPtr<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T: ?Sized> Borrow<T> for GcPtr<T>
[src]
impl<T: ?Sized + Eq> Eq for GcPtr<T>
[src]
impl<T: ?Sized + PartialEq> PartialEq for GcPtr<T>
[src]
fn eq(&self, other: &GcPtr<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 !=
.
impl<T: ?Sized + Ord> Ord for GcPtr<T>
[src]
fn cmp(&self, other: &GcPtr<T>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl<T: ?Sized + PartialOrd> PartialOrd for GcPtr<T>
[src]
fn partial_cmp(&self, other: &GcPtr<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: ?Sized + Hash> Hash for GcPtr<T>
[src]
fn hash<H>(&self, state: &mut H) where H: Hasher
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<T: ?Sized + Debug> Debug for GcPtr<T>
[src]
impl<T: ?Sized + Display> Display for GcPtr<T>
[src]
impl<T: ?Sized> Traverseable for GcPtr<T> where T: Traverseable
[src]
When traversing a GcPtr we need to mark it