Struct mun_memory::gc::GcRootPtr[][src]

pub struct GcRootPtr<T: TypeMemory + TypeTrace, G: GcRuntime<T>> { /* fields omitted */ }

A GcPtr that automatically roots and unroots its internal GcPtr.

Implementations

impl<T: TypeMemory + TypeTrace, G: GcRuntime<T>> GcRootPtr<T, G>[src]

pub fn new(runtime: &Arc<G>, handle: GcPtr) -> Self[src]

Constructs a new GCRootHandle from a runtime and a handle

pub fn handle(&self) -> GcPtr[src]

Returns the handle of this instance

pub fn unroot(self) -> GcPtr[src]

Unroots the handle consuming self and returning the unrooted handle

Trait Implementations

impl<T: TypeMemory + TypeTrace, G: GcRuntime<T>> Clone for GcRootPtr<T, G>[src]

impl<T: TypeMemory + TypeTrace, G: GcRuntime<T>> Drop for GcRootPtr<T, G>[src]

impl<T: TypeMemory + TypeTrace, G: GcRuntime<T>> HasIndirectionPtr for GcRootPtr<T, G>[src]

impl<T: TypeMemory + TypeTrace, G: GcRuntime<T>> Into<GcPtr> for GcRootPtr<T, G>[src]

Auto Trait Implementations

impl<T, G> RefUnwindSafe for GcRootPtr<T, G> where
    G: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, G> Send for GcRootPtr<T, G>

impl<T, G> Sync for GcRootPtr<T, G>

impl<T, G> Unpin for GcRootPtr<T, G> where
    T: Unpin

impl<T, G> UnwindSafe for GcRootPtr<T, G> where
    G: RefUnwindSafe,
    T: UnwindSafe

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<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.