Struct rcgc::Rooted

source ·
pub struct Rooted<T: Trace> { /* private fields */ }
Expand description

A rooted reference to a garbage-collected object of type T that keeps the object alive as long as it exists.

Implementations§

Creates a new garbage-collected unrooted handle to the object.

As long as self still exists, the handle will not be invalidated.

Trait Implementations§

The resulting type after dereferencing.
Dereferences the value.

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