[−][src]Struct gluon_vm::gc::GcPtr
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]
array: GcRef<'_, ValueArray>
) -> Result<GcRef<'_, ValueStr>, ()>
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
unsafe fn clone_unrooted(&self) -> Self
[src]
impl<T: ?Sized> CopyUnrooted for GcPtr<T>
[src]
unsafe fn copy_unrooted(&self) -> Self
[src]
impl<T: ?Sized + Debug> Debug for GcPtr<T>
[src]
impl<T: ?Sized> Deref for GcPtr<T>
[src]
impl<'de, 'gc, T> DeserializeState<'de, DeSeed<'gc>> for GcPtr<T> where
T: Trace + PostDeserialize + 'static,
T: DeserializeState<'de, DeSeed<'gc>>,
[src]
T: Trace + PostDeserialize + 'static,
T: DeserializeState<'de, DeSeed<'gc>>,
fn deserialize_state<D>(
seed: &mut DeSeed<'gc>,
deserializer: D
) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
seed: &mut DeSeed<'gc>,
deserializer: D
) -> Result<Self, D::Error> where
D: Deserializer<'de>,
impl<'de, 'gc> DeserializeState<'de, DeSeed<'gc>> for GcPtr<ValueStr>
[src]
fn deserialize_state<D>(
seed: &mut DeSeed<'gc>,
deserializer: D
) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
seed: &mut DeSeed<'gc>,
deserializer: D
) -> Result<Self, D::Error> where
D: Deserializer<'de>,
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]
fn from(v: &'gc GcPtr<ClosureData>) -> Self
[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]
fn from(v: GcPtr<ClosureData>) -> 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]
impl<T: ?Sized + Hash> Hash for GcPtr<T>
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: ?Sized + Ord> Ord for GcPtr<T>
[src]
fn cmp(&self, other: &GcPtr<T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: ?Sized + PartialEq> PartialEq<GcPtr<T>> for GcPtr<T>
[src]
impl<T: ?Sized + PartialOrd> PartialOrd<GcPtr<T>> for GcPtr<T>
[src]
fn partial_cmp(&self, other: &GcPtr<T>) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[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]
T: SerializeState<Seed>,
Seed: AsRef<NodeToId>,
fn serialize_state<S>(
&self,
serializer: S,
seed: &Seed
) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
&self,
serializer: S,
seed: &Seed
) -> Result<S::Ok, S::Error> where
S: Serializer,
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]
T: Trace,
When traversing a GcPtr
we need to mark it
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for GcPtr<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T: ?Sized> Unpin for GcPtr<T>
impl<T: ?Sized> UnwindSafe for GcPtr<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<Id> AsId<Id> for Id where
Id: ?Sized,
[src]
Id: ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'_, T> Captures<'_> for T
[src]
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
[src]
type Remainder = Choices
pub fn subset(
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
[src]
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastArc for T where
T: Downcast + Send + Sync,
[src]
T: Downcast + Send + Sync,
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[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]
U: From<T>,
impl<T, U, I> LiftInto<U, I> for T where
U: LiftFrom<T, I>,
[src]
U: LiftFrom<T, I>,
impl<Source> Sculptor<HNil, HNil> for Source
[src]
type Remainder = Source
pub fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,