[][src]Struct gluon_vm::gc::GcPtr

pub struct GcPtr<T: ?Sized>(_);

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).

Implementations

impl<T: ?Sized> GcPtr<T>[src]

pub unsafe fn as_mut(&mut self) -> &mut T[src]

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]

Unsafe as ptr must have been allocted by this garbage collector

pub fn generation(&self) -> Generation[src]

pub fn poly_tag(&self) -> Option<&InternedStr>[src]

pub fn field_map(&self) -> &FnvMap<InternedStr, VmIndex>[src]

pub fn field_names(&self) -> &Arc<[InternedStr]>[src]

pub fn ptr_eq(&self, other: &GcPtr<T>) -> bool[src]

pub unsafe fn unrooted(&self) -> Self[src]

pub fn as_lifetime(&self) -> &()[src]

pub unsafe fn cast<U>(ptr: Self) -> GcPtr<U>[src]

impl<'a, T: Trace + Send + Sync + 'a> GcPtr<T>[src]

pub fn as_trace(self) -> GcPtr<dyn Trace + Send + Sync + 'a>[src]

Coerces self to a Trace trait object

impl GcPtr<str>[src]

pub fn as_trace_string(self) -> GcPtr<dyn Trace + Send + Sync>[src]

Coerces self to a Trace trait object

impl GcPtr<ValueStr>[src]

pub fn from_utf8(
    array: GcRef<'_, ValueArray>
) -> Result<GcRef<'_, ValueStr>, ()>
[src]

pub unsafe fn from_utf8_unchecked(array: GcPtr<ValueArray>) -> GcPtr<ValueStr>[src]

Trait Implementations

impl<T: ?Sized> Borrow<T> for GcPtr<T>[src]

impl<T: ?Sized> CloneUnrooted for GcPtr<T>[src]

type Value = Self

impl<T: ?Sized> CopyUnrooted for GcPtr<T>[src]

impl<T: ?Sized + Debug> Debug for GcPtr<T>[src]

impl<T: ?Sized> Deref for GcPtr<T>[src]

type Target = T

The resulting type after dereferencing.

impl<'de, 'gc, T> DeserializeState<'de, DeSeed<'gc>> for GcPtr<T> where
    T: Trace + PostDeserialize + 'static,
    T: DeserializeState<'de, DeSeed<'gc>>, 
[src]

impl<'de, 'gc> DeserializeState<'de, DeSeed<'gc>> for GcPtr<ValueStr>[src]

impl<T: ?Sized + Display> Display for GcPtr<T>[src]

impl<T: ?Sized + Eq> Eq for GcPtr<T>[src]

impl<'gc> From<&'gc GcPtr<Box<dyn Userdata + 'static>>> for Variants<'gc>[src]

impl<'gc> From<&'gc GcPtr<ClosureData>> for Variants<'gc>[src]

impl<'gc> From<&'gc GcPtr<DataStruct>> for Variants<'gc>[src]

impl<'gc> From<&'gc GcPtr<ExternFunction>> for Variants<'gc>[src]

impl<'gc> From<&'gc GcPtr<PartialApplicationData>> for Variants<'gc>[src]

impl<'gc> From<&'gc GcPtr<Thread>> for Variants<'gc>[src]

impl<'gc> From<&'gc GcPtr<ValueArray>> for Variants<'gc>[src]

impl<'gc> From<&'gc GcPtr<ValueStr>> for Variants<'gc>[src]

impl From<GcPtr<Box<dyn Userdata + 'static>>> for Value[src]

impl From<GcPtr<ClosureData>> for Value[src]

impl From<GcPtr<DataStruct>> for Value[src]

impl From<GcPtr<ExternFunction>> for Value[src]

impl From<GcPtr<PartialApplicationData>> for Value[src]

impl From<GcPtr<Thread>> for Value[src]

impl From<GcPtr<ValueArray>> for Value[src]

impl From<GcPtr<ValueStr>> for Value[src]

impl<T: ?Sized> From<OwnedPtr<T>> for GcPtr<T>[src]

fn from(ptr: OwnedPtr<T>) -> GcPtr<T>[src]

Freezes self into a shared pointer

impl<T: ?Sized + Hash> Hash for GcPtr<T>[src]

impl<T: ?Sized + Ord> Ord for GcPtr<T>[src]

impl<T: ?Sized + PartialEq> PartialEq<GcPtr<T>> for GcPtr<T>[src]

impl<T: ?Sized + PartialOrd> PartialOrd<GcPtr<T>> for GcPtr<T>[src]

impl<T: ?Sized + Send + Sync> Send for GcPtr<T>[src]

impl Serialize for GcPtr<ValueStr>[src]

impl<T, Seed> SerializeState<Seed> for GcPtr<T> where
    T: SerializeState<Seed>,
    Seed: AsRef<NodeToId>, 
[src]

impl<T> Shared for GcPtr<T>[src]

impl<T: ?Sized + Send + Sync> Sync for GcPtr<T>[src]

impl<T: ?Sized> Trace for GcPtr<T> where
    T: Trace
[src]

When traversing a GcPtr we need to mark it

Auto Trait Implementations

impl<T: ?Sized> RefUnwindSafe for GcPtr<T> where
    T: RefUnwindSafe

impl<T: ?Sized> Unpin for GcPtr<T>

impl<T: ?Sized> UnwindSafe for GcPtr<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<Id> AsId<Id> for Id where
    Id: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'_, T> Captures<'_> for T[src]

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices[src]

type Remainder = Choices

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastArc for T where
    T: Downcast + Send + Sync
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<D, T> FromPtr<D> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U, I> LiftInto<U, I> for T where
    U: LiftFrom<T, I>, 
[src]

impl<Source> Sculptor<HNil, HNil> for Source[src]

type Remainder = Source

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.