Struct arret_runtime::boxed::refs::Gc[][src]

#[repr(transparent)]
pub struct Gc<T: Boxed> { /* fields omitted */ }

Reference to a garbage collected value

This is not memory safe and does not GC root; it’s just sugar for a raw pointer.

Implementations

impl<T: Boxed> Gc<T>[src]

pub unsafe fn new(ptr: *const T) -> Gc<T>[src]

Returns a new instance wrapping a pointer to a garbage collected box

Safety

The requires a valid pointer to a box

pub unsafe fn cast<U: Boxed>(self) -> Gc<U>[src]

Unchecked cast to the passed type

Safety

The requires the box to be of the asserted type

pub fn as_ptr(self) -> *const T[src]

Returns a pointer to the garbage collected box

Trait Implementations

impl<T: Boxed> Clone for Gc<T>[src]

impl<T: Boxed> Debug for Gc<T> where
    T: Debug
[src]

impl<T: Boxed> Deref for Gc<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: Boxed> EncodeAbiType for Gc<T> where
    T: EncodeBoxedAbiType
[src]

impl<T: Boxed> From<Capture<T>> for Gc<T>[src]

impl<T: Boxed> From<NoCapture<T>> for Gc<T>[src]

impl<T: Boxed> Hash for Gc<T> where
    T: Hash
[src]

impl<T: Boxed> PartialEq<Gc<T>> for Gc<T> where
    T: PartialEq
[src]

impl<T: Boxed> Copy for Gc<T>[src]

impl<T> Eq for Gc<T> where
    T: Boxed + Eq
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Gc<T> where
    T: RefUnwindSafe

impl<T> !Send for Gc<T>

impl<T> !Sync for Gc<T>

impl<T> Unpin for Gc<T>

impl<T> UnwindSafe for Gc<T> where
    T: RefUnwindSafe

Blanket Implementations

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

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

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

impl<T> EncodeRetAbiType for T where
    T: EncodeAbiType
[src]

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

impl<T> HashInHeap for T where
    T: Hash
[src]

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

impl<T> PartialEqInHeap for T where
    T: PartialEq<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.