#[repr(transparent)]
pub struct GcCell<T: Trace + Copy>(_);
Expand description

A Cell pointing to a garbage collected object.

This only supports mutating NullTrace types, becuase garbage collected pointers need write barriers.

Implementations

Create a new cell

Get a mutable reference to this cell’s value

This is safe because the &mut self guarentees exclusive access to the cell.

Get a pointer to this cell’s conent

Get the current value of this cell

Change the interior of this type to the specified type

The type must be NullTrace because garbage collected types need write barriers.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Trigger a write barrier, before writing to one of the owning object’s managed fields Read more

This type with all garbage collected lifetimes changed to 'new_gc Read more

Trace this object behind a Gc pointer. Read more

Whether this type needs to be traced by the garbage collector. Read more

If this type needs a destructor run. Read more

Trace each field in this type. Read more

Trace an immutable reference to this type 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.