Skip to main content

engage/generated/system/
uint32.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-uint32-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/uint32/UInt32.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct UInt32 {
17        pub m_value: u32,
18    }
19    impl ::unity::ClassIdentity for UInt32 {
20        const NAME: &'static str = "UInt32";
21        const NAMESPACE: &'static str = "System";
22
23        fn class() -> ::unity::Class {
24            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
25            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
26        }
27    }
28    impl ::unity::IlType for UInt32 {
29        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
30            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
31        }
32    }
33    impl UInt32 {
34        #[inline]
35        pub fn max_value() -> u32 {
36            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
37            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MaxValue");
38            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
39        }
40
41        #[inline]
42        pub fn set_max_value(value: u32) {
43            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
44            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MaxValue");
45            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
46        }
47
48        #[inline]
49        pub fn min_value() -> u32 {
50            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
51            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MinValue");
52            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
53        }
54
55        #[inline]
56        pub fn set_min_value(value: u32) {
57            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
58            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MinValue");
59            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
60        }
61    }
62}
63
64#[cfg(feature = "system-uint32-types")]
65pub use __types::*;
66
67#[cfg(feature = "system-uint32")]
68impl UInt32 {
69    #[doc = "`Parse(::unity::Il2CppString)` overload"]
70    pub fn parse(s: impl ::core::convert::Into<::unity::Il2CppString>) -> u32 {
71        unsafe {
72            ::unity::il2cpp_call!((::unity::module_base()+0x35689c0usize)as*mut u8,u32;
73(::unity::Il2CppString)::core::convert::Into::into(s))
74        }
75    }
76}
77
78#[cfg(feature = "system-uint32")]
79impl UInt32 {
80    #[doc = "`CompareTo(crate::system::object::Object)` overload"]
81    pub fn compare_to(&mut self, value: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
82        unsafe {
83            ::unity::il2cpp_call!((::unity::module_base()+0x35686f0usize)as*mut u8,i32;
84(*mut UInt32)self as*mut UInt32,(crate::system::object::Object)::core::convert::Into::into(value))
85        }
86    }
87
88    #[doc = "`CompareTo(u32)` overload"]
89    pub fn compare_to_2(&mut self, value: impl ::core::convert::Into<u32>) -> i32 {
90        unsafe {
91            ::unity::il2cpp_call!((::unity::module_base()+0x35687f0usize)as*mut u8,i32;
92(*mut UInt32)self as*mut UInt32,(u32)::core::convert::Into::into(value))
93        }
94    }
95
96    #[doc = "`Equals(crate::system::object::Object)` overload"]
97    pub fn equals(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
98        unsafe {
99            ::unity::il2cpp_call!((::unity::module_base()+0x3568810usize)as*mut u8,bool;
100(*mut UInt32)self as*mut UInt32,(crate::system::object::Object)::core::convert::Into::into(obj))
101        }
102    }
103
104    #[doc = "`Equals(u32)` overload"]
105    pub fn equals_2(&mut self, obj: impl ::core::convert::Into<u32>) -> bool {
106        unsafe {
107            ::unity::il2cpp_call!((::unity::module_base()+0x35688a0usize)as*mut u8,bool;
108(*mut UInt32)self as*mut UInt32,(u32)::core::convert::Into::into(obj))
109        }
110    }
111
112    #[doc = "`GetHashCode()` overload"]
113    pub fn get_hash_code(&mut self) -> i32 {
114        unsafe {
115            ::unity::il2cpp_call!((::unity::module_base()+0x35688b0usize)as*mut u8,i32;
116(*mut UInt32)self as*mut UInt32)
117        }
118    }
119
120    #[doc = "`ToString()` overload"]
121    pub fn to_string(&mut self) -> ::unity::Il2CppString {
122        unsafe {
123            ::unity::il2cpp_call!((::unity::module_base()+0x35688c0usize)as*mut u8, ::unity::Il2CppString;
124(*mut UInt32)self as*mut UInt32)
125        }
126    }
127
128    #[doc = "`ToString(::unity::Il2CppString)` overload"]
129    pub fn to_string_2(&mut self, format: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
130        unsafe {
131            ::unity::il2cpp_call!((::unity::module_base()+0x3568940usize)as*mut u8, ::unity::Il2CppString;
132(*mut UInt32)self as*mut UInt32,(::unity::Il2CppString)::core::convert::Into::into(format))
133        }
134    }
135}
136
137#[cfg(feature = "system-uint32")]
138impl UInt32 {
139    pub fn compare_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
140        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
141    }
142
143    pub fn compare_to_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
144        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
145    }
146
147    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
148        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
149    }
150
151    pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
153    }
154
155    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
156        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
157    }
158
159    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
160        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
161    }
162
163    pub fn to_string_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
164        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
165    }
166
167    pub fn parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
168        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
169    }
170}
171
172#[cfg(feature = "system-uint32")]
173#[doc(hidden)]
174pub mod prelude {
175    pub use super::UInt32;
176    #[cfg(feature = "system-object")]
177    pub use crate::system::object::IObjectMethods;
178    #[cfg(feature = "system-valuetype")]
179    pub use crate::system::valuetype::IValueTypeMethods;
180    pub use crate::system::{object::IObject, valuetype::IValueType};
181}