-
-
Notifications
You must be signed in to change notification settings - Fork 9
AnyType
IsaacShelton edited this page Mar 21, 2022
·
1 revision
AnyType
represents the type of runtime type information.
Type | Size | Memory Management Model | File |
---|---|---|---|
AnyType |
32 bytes | None | N/A |
struct AnyType (kind AnyTypeKind, name *ubyte, is_alias bool, size usize)
Name | Type | Description |
---|---|---|
kind |
AnyTypeKind |
What kind of type |
name |
*ubyte |
Human readable name of the type |
is_alias |
bool |
Whether the type is an alias |
size |
usize |
Size of the type in bytes |
Most *AnyType
values don't directly refer to an AnyType
, but rather one of the types like AnyType
such as AnyStructType
or AnyPtrType
. Which kind of type it is can be determined by examining the kind
of AnyType
.
More detailed overlapping structs include:
When runtime type information is enabled, the compiler will include the global variables __types__
and __types_length__
:
__types__ **AnyType
__types_length__ usize
These contain runtime type information for every type used in the program.