pub struct TypeInfo {
pub element: i32,
pub value_type: bool,
pub is_enum: bool,
pub byref: bool,
pub namespace: &'static str,
pub name: &'static str,
}Expand description
The managed type of a parameter or return value.
Fields§
§element: i32The Il2CppTypeEnum value. For enums, the element type of the underlying integer.
value_type: boolWhether values are passed by value as a struct (including enums and
generic structs like Nullable<int>), not as an object pointer.
is_enum: boolWhether the type is an enum; TypeInfo::element is then its underlying integer type.
byref: boolWhether this is a ref/out/in parameter, passed as a pointer.
namespace: &'static strThe class’s namespace, e.g. UnityEngine; empty for primitives without a class.
name: &'static strThe class’s name, e.g. Vector3; empty for primitives without a class.
Implementations§
Source§impl TypeInfo
impl TypeInfo
Sourcepub fn is_value_type(&self, namespace: &str, name: &str) -> bool
pub fn is_value_type(&self, namespace: &str, name: &str) -> bool
Whether this is the value type namespace.name, passed by value. For
Il2CppValue impls of #[repr(C)] structs mirroring a managed struct.
Trait Implementations§
impl Copy for TypeInfo
impl Eq for TypeInfo
impl StructuralPartialEq for TypeInfo
Auto Trait Implementations§
impl Forget for TypeInfo
impl Freeze for TypeInfo
impl Move for TypeInfo
impl RefUnwindSafe for TypeInfo
impl Send for TypeInfo
impl Sync for TypeInfo
impl Unpin for TypeInfo
impl UnsafeUnpin for TypeInfowhere
&'static str: UnsafeUnpin,
impl UnwindSafe for TypeInfowhere
&'static str: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more