Struct gluon_vm::gc::GcPtr [−][src]
pub struct GcPtr<T: ?Sized> { /* 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]
impl<T: ?Sized> GcPtr<T>
pub unsafe fn as_mut(&mut self) -> &mut T
[src]
pub 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
pub unsafe fn from_raw(ptr: *const T) -> GcPtr<T>
[src]
pub unsafe fn from_raw(ptr: *const T) -> GcPtr<T>
Unsafe as ptr
must have been allocted by this garbage collector
pub fn generation(&self) -> Generation
[src]
pub fn generation(&self) -> Generation
pub fn field_map(&self) -> &FnvMap<InternedStr, VmIndex>
[src]
pub fn field_map(&self) -> &FnvMap<InternedStr, VmIndex>
pub fn field_names(&self) -> &Arc<Vec<InternedStr>>
[src]
pub fn field_names(&self) -> &Arc<Vec<InternedStr>>
impl<'a, T: Traverseable + Send + Sync + 'a> GcPtr<T>
[src]
impl<'a, T: Traverseable + Send + Sync + 'a> GcPtr<T>
pub fn as_traverseable(self) -> GcPtr<Traverseable + Send + Sync + 'a>
[src]
pub fn as_traverseable(self) -> GcPtr<Traverseable + Send + Sync + 'a>
Coerces self
to a Traverseable
trait object
impl GcPtr<str>
[src]
impl GcPtr<str>
pub fn as_traverseable_string(self) -> GcPtr<Traverseable + Send + Sync>
[src]
pub 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> Send for GcPtr<T>
impl<T: ?Sized + Send + Sync> Sync for GcPtr<T>
[src]
impl<T: ?Sized + Send + Sync> Sync for GcPtr<T>
impl<T: ?Sized> Copy for GcPtr<T>
[src]
impl<T: ?Sized> Copy for GcPtr<T>
impl<T: ?Sized> Clone for GcPtr<T>
[src]
impl<T: ?Sized> Clone for GcPtr<T>
fn clone(&self) -> 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[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: ?Sized> Deref for GcPtr<T>
[src]
impl<T: ?Sized> Deref for GcPtr<T>
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T
[src]
fn deref(&self) -> &T
Dereferences the value.
impl<T: ?Sized> Borrow<T> for GcPtr<T>
[src]
impl<T: ?Sized> Borrow<T> for GcPtr<T>
impl<T: ?Sized + Eq> Eq for GcPtr<T>
[src]
impl<T: ?Sized + Eq> Eq for GcPtr<T>
impl<T: ?Sized + PartialEq> PartialEq for GcPtr<T>
[src]
impl<T: ?Sized + PartialEq> PartialEq for GcPtr<T>
fn eq(&self, other: &GcPtr<T>) -> bool
[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[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<T: ?Sized + Ord> Ord for GcPtr<T>
[src]
impl<T: ?Sized + Ord> Ord for GcPtr<T>
fn cmp(&self, other: &GcPtr<T>) -> Ordering
[src]
fn cmp(&self, other: &GcPtr<T>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<T: ?Sized + PartialOrd> PartialOrd for GcPtr<T>
[src]
impl<T: ?Sized + PartialOrd> PartialOrd for GcPtr<T>
fn partial_cmp(&self, other: &GcPtr<T>) -> Option<Ordering>
[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[src]
fn lt(&self, other: &Rhs) -> bool
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[src]
fn le(&self, other: &Rhs) -> bool
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[src]
fn gt(&self, other: &Rhs) -> bool
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[src]
fn ge(&self, other: &Rhs) -> bool
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]
impl<T: ?Sized + Hash> Hash for GcPtr<T>
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: ?Sized + Debug> Debug for GcPtr<T>
[src]
impl<T: ?Sized + Debug> Debug for GcPtr<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: ?Sized + Display> Display for GcPtr<T>
[src]
impl<T: ?Sized + Display> Display for GcPtr<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: ?Sized> Traverseable for GcPtr<T> where
T: Traverseable,
[src]
impl<T: ?Sized> Traverseable for GcPtr<T> where
T: Traverseable,
When traversing a GcPtr
we need to mark it