Struct mun_memory::gc::GcRootPtr

source ·
pub struct GcRootPtr<G>where
    G: GcRuntime,
{ /* private fields */ }
Expand description

A GcPtr that automatically roots and unroots its internal GcPtr.

Implementations§

Constructs a new GCRootHandle from a runtime and a handle

Returns the runtime that owns the memory

Returns the handle of this instance

Unroots the handle consuming self and returning the unrooted handle TODO: Should this simply return nothing, since the returned handle may be collected at any time?

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Executes the destructor for this type. Read more
Converts to this type from the input type.
Returns a pointer to the referenced memory. Read more
Returns a mutable pointer to the referenced memory. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.