pub enum ElementType {
Show 26 variants
Void,
Boolean,
Char,
I1,
U1,
I2,
U2,
I4,
U4,
I8,
U8,
R4,
R8,
String,
Ptr,
ValueType,
Class,
Var,
Array,
GenericInst,
I,
U,
Object,
SzArray,
MVar,
Unknown(i32),
}Expand description
The managed element type of a field, parameter, or return value.
Variants§
Void
void.
Boolean
bool.
Char
char.
I1
sbyte.
U1
byte.
I2
short.
U2
ushort.
I4
int.
U4
uint.
I8
long.
U8
ulong.
R4
float.
R8
double.
String
string.
Ptr
An unmanaged pointer.
ValueType
A struct or enum.
Class
A reference type other than string and object.
Var
A generic class’s type parameter.
Array
A multi-dimensional array.
GenericInst
A constructed generic type, e.g. List<int>.
I
nint.
U
nuint.
Object
object.
SzArray
A single-dimensional array, e.g. int[].
MVar
A generic method’s type parameter.
Unknown(i32)
Any other Il2CppTypeEnum value, kept as is.
Implementations§
Source§impl ElementType
impl ElementType
Sourcepub fn is_float(self) -> bool
pub fn is_float(self) -> bool
Whether this is float or double, passed in floating-point registers.
Sourcepub fn is_integer(self) -> bool
pub fn is_integer(self) -> bool
Whether this is passed as an integer: bool, char and every integer
type, including nint/nuint.
Sourcepub fn is_reference(self) -> bool
pub fn is_reference(self) -> bool
Whether a value of this type is an object pointer (string, class,
object, array or generic instance). A generic instance can also be a
struct; check TypeInfo::value_type for that.