#[repr(C)]pub enum TypeKind {
Primitive(PrimitiveType),
Class(TypeDefinitionIndex),
ValueType(TypeDefinitionIndex),
SzArray(Box<Il2CppType>),
Array {
element: Box<Il2CppType>,
rank: u8,
},
Ptr(Box<Il2CppType>),
GenericInst {
generic: Box<Il2CppType>,
args: Vec<Il2CppType>,
},
Var(i32),
MVar(i32),
FnPtr,
Unknown(u8),
}Expand description
What an Il2CppType is: its element type and the data that goes with it.
Mirrors Il2CppTypeEnum plus the data union of IL2CPP’s Il2CppType.
Variants§
Primitive(PrimitiveType)
void, bool, …, string, object, IntPtr, TypedReference.
Class(TypeDefinitionIndex)
A reference type, by index into Metadata::type_definitions.
ValueType(TypeDefinitionIndex)
A value type, by index into Metadata::type_definitions.
SzArray(Box<Il2CppType>)
A single-dimension, zero-based array (T[]).
Array
A multi-dimensional array (T[,]).
Ptr(Box<Il2CppType>)
An unmanaged pointer (T*).
GenericInst
A constructed generic type, e.g. List<int>.
Fields
generic: Box<Il2CppType>The generic type definition, e.g. List<T>.
args: Vec<Il2CppType>The type arguments, in order.
Var(i32)
A type’s generic parameter, by index into Metadata::generic_parameters.
MVar(i32)
A method’s generic parameter, by index into Metadata::generic_parameters.
FnPtr
A function pointer. Its signature isn’t decoded.
Unknown(u8)
An element type this reader doesn’t know, with its raw Il2CppTypeEnum value.