VariantConstructors

gdext.builtin.VariantConstructors

Caches the engine's per-type Variant constructor functions.

get_variant_from_type_constructor / ..._to_type_constructor are relatively expensive lookups, but the function pointer they return is stable for the lifetime of the process. gdext caches these in a table indexed by variant type; we do the same.

Variant type tags are small contiguous integers (NIL=0 .. MAX), so a flat array indexed by the tag is the natural cache. The cache is populated lazily on first use of each type and never invalidated.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Builtin constructor number index of type t (as listed in the API).

Builtin constructor number index of type t (as listed in the API).

Attributes

Destructor that releases a raw builtin value of type t in place.

Destructor that releases a raw builtin value of type t in place.

Attributes

Constructor that writes a Variant of t from a raw type pointer.

Constructor that writes a Variant of t from a raw type pointer.

Attributes

Constructor that writes a raw type value from a Variant of t.

Constructor that writes a raw type value from a Variant of t.

Attributes