Variant

gdext.builtin.Variant$package.Variant
object Variant

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Variant.type

Members list

Value members

Concrete methods

def from[A](value: A, dest: GDExtensionVariantPtr)(using tv: ToVariant[A]): Variant

Build a Variant from a Scala value into caller-provided storage.

Build a Variant from a Scala value into caller-provided storage.

Value parameters

dest

a buffer of at least BuiltinSizes.Variant bytes

Attributes

Wrap an existing engine Variant pointer without copying.

Wrap an existing engine Variant pointer without copying.

Attributes

inline def scope[A, R](value: A)(body: Variant => R)(using tv: ToVariant[A]): R

Run body with a stack-allocated Variant built from value. The Variant (and its storage) are valid only for the duration of body; the payload is destroyed on exit.

Run body with a stack-allocated Variant built from value. The Variant (and its storage) are valid only for the duration of body; the payload is destroyed on exit.

Attributes

Extensions

Extensions

extension (v: Variant)
def destroy(): Unit

Releases any reference-counted payload held by this Variant.

Releases any reference-counted payload held by this Variant.

Attributes

The raw pointer to the 24-byte Variant storage.

The raw pointer to the 24-byte Variant storage.

Attributes

def to[A](using fv: FromVariant[A]): A

Decode this Variant into a Scala value via the FromVariant seam.

Decode this Variant into a Scala value via the FromVariant seam.

Attributes

The runtime Variant type tag (NIL, INT, STRING, ...).

The runtime Variant type tag (NIL, INT, STRING, ...).

Attributes