Struct comet::gcref::UntypedGcRef[][src]

#[repr(C)]
pub struct UntypedGcRef { /* fields omitted */ }
Expand description

A untyped garbage collected pointer to a value, you can think of it as void* pointer but managed by GC.

This is the equivalent of a garbage collected smart-pointer.

The smart pointer is simply a guarantee to the garbage collector that this points to a garbage collected object with the correct header, and not some arbitrary bits that you’ve decided to heap allocate.

Implementations

Returns data part of GC object. That is part of allocation after heap object header.

Returns true if object has the same index.

Returns Some(T) if T::index() is the same as in this object.

Unchecked cast withouth verifying indexes.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Formats the value using the given formatter.

Function invoking the tracing for an object of type T. Read more

trace_ method is used for C FFI safety.

Returns trace descriptor for type that implements this trait. Not recommended to override it.

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)

recently added

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.