Skip to main content

engage/generated/system/
uintptr.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-uintptr-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        valuetype::{IValueType, ValueType},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/uintptr/UIntPtr.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct UIntPtr {}
17    impl ::unity::ClassIdentity for UIntPtr {
18        const NAME: &'static str = "UIntPtr";
19        const NAMESPACE: &'static str = "System";
20
21        fn class() -> ::unity::Class {
22            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
23            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
24        }
25    }
26    impl ::unity::IlType for UIntPtr {
27        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
28            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
29        }
30    }
31    impl UIntPtr {
32        #[inline]
33        pub fn zero() -> usize {
34            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
35            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "Zero");
36            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
37        }
38
39        #[inline]
40        pub fn set_zero(value: usize) {
41            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
42            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "Zero");
43            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
44        }
45    }
46}
47
48#[cfg(feature = "system-uintptr-types")]
49pub use __types::*;
50
51#[cfg(feature = "system-uintptr")]
52impl UIntPtr {
53    #[doc = "`op_Equality(usize, usize)` overload"]
54    pub fn op_equality(value1: impl ::core::convert::Into<usize>, value2: impl ::core::convert::Into<usize>) -> bool {
55        unsafe {
56            ::unity::il2cpp_call!((::unity::module_base()+0x3569f50usize)as*mut u8,bool;
57(usize)::core::convert::Into::into(value1),(usize)::core::convert::Into::into(value2))
58        }
59    }
60
61    #[doc = "`get_Size()` overload"]
62    pub fn get_size() -> i32 {
63        unsafe {
64            ::unity::il2cpp_call!((::unity::module_base()+0x3569e90usize)as*mut u8,i32;
65            )
66        }
67    }
68
69    #[doc = "`.cctor()` overload"]
70    pub fn cctor() -> () {
71        unsafe {
72            ::unity::il2cpp_call!((::unity::module_base()+0x3569f60usize)as*mut u8,();
73            )
74        }
75    }
76}
77
78#[cfg(feature = "system-uintptr")]
79impl UIntPtr {
80    #[doc = "`.ctor(u32)` overload"]
81    pub fn ctor(&mut self, value: impl ::core::convert::Into<u32>) -> () {
82        unsafe {
83            ::unity::il2cpp_call!((::unity::module_base()+0x3569d60usize)as*mut u8,();
84(*mut UIntPtr)self as*mut UIntPtr,(u32)::core::convert::Into::into(value))
85        }
86    }
87
88    #[doc = "`Equals(crate::system::object::Object)` overload"]
89    pub fn equals(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
90        unsafe {
91            ::unity::il2cpp_call!((::unity::module_base()+0x3569d70usize)as*mut u8,bool;
92(*mut UIntPtr)self as*mut UIntPtr,(crate::system::object::Object)::core::convert::Into::into(obj))
93        }
94    }
95
96    #[doc = "`GetHashCode()` overload"]
97    pub fn get_hash_code(&mut self) -> i32 {
98        unsafe {
99            ::unity::il2cpp_call!((::unity::module_base()+0x3569e00usize)as*mut u8,i32;
100(*mut UIntPtr)self as*mut UIntPtr)
101        }
102    }
103
104    #[doc = "`ToString()` overload"]
105    pub fn to_string(&mut self) -> ::unity::Il2CppString {
106        unsafe {
107            ::unity::il2cpp_call!((::unity::module_base()+0x3569e10usize)as*mut u8, ::unity::Il2CppString;
108(*mut UIntPtr)self as*mut UIntPtr)
109        }
110    }
111}
112
113#[cfg(feature = "system-uintptr")]
114impl UIntPtr {
115    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
116        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
117    }
118
119    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
120        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
121    }
122
123    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
124        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
125    }
126
127    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
128        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
129    }
130
131    pub fn op_equality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
132        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
133    }
134
135    pub fn get_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
136        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
137    }
138
139    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
140        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
141    }
142}
143
144#[cfg(feature = "system-uintptr")]
145#[doc(hidden)]
146pub mod prelude {
147    pub use super::UIntPtr;
148    #[cfg(feature = "system-object")]
149    pub use crate::system::object::IObjectMethods;
150    #[cfg(feature = "system-valuetype")]
151    pub use crate::system::valuetype::IValueTypeMethods;
152    pub use crate::system::{object::IObject, valuetype::IValueType};
153}