pub enum CilType {
Show 26 variants
Void,
Bool,
Int8,
Int16,
Int32,
Int64,
UInt8,
UInt16,
UInt32,
UInt64,
Float32,
Float64,
Char,
String,
Object,
Class {
assembly: Option<String>,
namespace: String,
name: String,
},
ValueType {
assembly: Option<String>,
namespace: String,
name: String,
},
Array(Box<CilType>),
MdArray(Box<CilType>, u32),
Ptr(Box<CilType>),
ByRef(Box<CilType>),
Generic(Box<CilType>, Vec<CilType>),
GenericParam(u32),
GenericMethodParam(u32),
NativeInt,
NativeUInt,
}Expand description
CIL type representation.
Covers all types available in the .NET Common Type System (CTS).
Variants§
Void
void — no return value
Bool
bool — System.Boolean (1 byte)
Int8
int8 — System.SByte
Int16
int16 — System.Int16
Int32
int32 — System.Int32
Int64
int64 — System.Int64
UInt8
uint8 — System.Byte
UInt16
uint16 — System.UInt16
UInt32
uint32 — System.UInt32
UInt64
uint64 — System.UInt64
Float32
float32 — System.Single
Float64
float64 — System.Double
Char
char — System.Char (UTF-16 code unit)
String
string — System.String (immutable UTF-16 string)
Object
object — System.Object (root of the type hierarchy)
Class
class [Assembly]Namespace.TypeName
ValueType
valuetype [Assembly]Namespace.TypeName
Array(Box<CilType>)
T[] — single-dimensional array (szarray)
MdArray(Box<CilType>, u32)
T[,] — multi-dimensional array
Ptr(Box<CilType>)
T* — unmanaged pointer
ByRef(Box<CilType>)
T& — managed reference (byref)
Generic(Box<CilType>, Vec<CilType>)
Generic instance: class MyType<T1, T2>
GenericParam(u32)
Generic parameter !T (class-level)
GenericMethodParam(u32)
Generic method parameter !!T
NativeInt
native int — platform-native integer
NativeUInt
native uint
Implementations§
Source§impl CilType
impl CilType
Sourcepub fn is_value_type(&self) -> bool
pub fn is_value_type(&self) -> bool
Returns true if this is a value type (not a reference type).
Sourcepub fn is_reference_type(&self) -> bool
pub fn is_reference_type(&self) -> bool
Returns true if this is a reference type.
Sourcepub fn boxed_name(&self) -> &'static str
pub fn boxed_name(&self) -> &'static str
Return the fully-qualified boxed name for use in generics.