engage/generated/system/
boolean.rs1#[cfg(feature = "system-boolean-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/boolean/Boolean.md"))]
14 #[repr(C)]
15 #[derive(::core::clone::Clone, ::core::marker::Copy)]
16 pub struct Boolean {
17 pub m_value: bool,
18 }
19 impl ::unity::ClassIdentity for Boolean {
20 const NAME: &'static str = "Boolean";
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 Boolean {
29 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
30 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
31 }
32 }
33 impl Boolean {
34 #[inline]
35 pub fn r#true() -> i32 {
36 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
37 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "True");
38 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
39 }
40
41 #[inline]
42 pub fn set_true(value: i32) {
43 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
44 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "True");
45 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
46 }
47
48 #[inline]
49 pub fn r#false() -> i32 {
50 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
51 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "False");
52 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
53 }
54
55 #[inline]
56 pub fn set_false(value: i32) {
57 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
58 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "False");
59 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
60 }
61
62 #[inline]
63 pub fn true_literal() -> ::unity::Il2CppString {
64 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
65 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "TrueLiteral");
66 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
67 }
68
69 #[inline]
70 pub fn set_true_literal(value: ::unity::Il2CppString) {
71 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
72 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "TrueLiteral");
73 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
74 }
75
76 #[inline]
77 pub fn false_literal() -> ::unity::Il2CppString {
78 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
79 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "FalseLiteral");
80 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
81 }
82
83 #[inline]
84 pub fn set_false_literal(value: ::unity::Il2CppString) {
85 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
86 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "FalseLiteral");
87 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
88 }
89
90 #[inline]
91 pub fn true_string() -> ::unity::Il2CppString {
92 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
93 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "TrueString");
94 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
95 }
96
97 #[inline]
98 pub fn set_true_string(value: ::unity::Il2CppString) {
99 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
100 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "TrueString");
101 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
102 }
103
104 #[inline]
105 pub fn false_string() -> ::unity::Il2CppString {
106 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
107 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "FalseString");
108 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
109 }
110
111 #[inline]
112 pub fn set_false_string(value: ::unity::Il2CppString) {
113 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
114 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "FalseString");
115 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
116 }
117 }
118}
119
120#[cfg(feature = "system-boolean-types")]
121pub use __types::*;
122
123#[cfg(feature = "system-boolean")]
124impl Boolean {
125 #[doc = "`Parse(::unity::Il2CppString)` overload"]
126 pub fn parse(value: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
127 unsafe {
128 ::unity::il2cpp_call!((::unity::module_base()+0x33934b0usize)as*mut u8,bool;
129(::unity::Il2CppString)::core::convert::Into::into(value))
130 }
131 }
132
133 #[doc = "`TryParse(::unity::Il2CppString, *mutbool)` overload"]
134 pub fn try_parse(value: impl ::core::convert::Into<::unity::Il2CppString>) -> (bool, bool) {
135 unsafe {
136 let mut __out_0 = ::core::mem::MaybeUninit::<bool>::uninit();
137 let __ret = {
138 ::unity::il2cpp_call!((::unity::module_base()+0x33935d0usize)as*mut u8,bool;
139(::unity::Il2CppString)::core::convert::Into::into(value),(*mut bool)__out_0.as_mut_ptr())
140 };
141 (__ret, __out_0.assume_init())
142 }
143 }
144
145 #[doc = "`TrimWhiteSpaceAndNull(::unity::Il2CppString)` overload"]
146 pub fn trim_white_space_and_null(value: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
147 unsafe {
148 ::unity::il2cpp_call!((::unity::module_base()+0x3393710usize)as*mut u8, ::unity::Il2CppString;
149(::unity::Il2CppString)::core::convert::Into::into(value))
150 }
151 }
152
153 #[doc = "`.cctor()` overload"]
154 pub fn cctor() -> () {
155 unsafe {
156 ::unity::il2cpp_call!((::unity::module_base()+0x33940b0usize)as*mut u8,();
157 )
158 }
159 }
160}
161
162#[cfg(feature = "system-boolean")]
163impl Boolean {
164 #[doc = "`GetHashCode()` overload"]
165 pub fn get_hash_code(&mut self) -> i32 {
166 unsafe {
167 ::unity::il2cpp_call!((::unity::module_base()+0x33931d0usize)as*mut u8,i32;
168(*mut Boolean)self as*mut Boolean)
169 }
170 }
171
172 #[doc = "`ToString()` overload"]
173 pub fn to_string(&mut self) -> ::unity::Il2CppString {
174 unsafe {
175 ::unity::il2cpp_call!((::unity::module_base()+0x33931e0usize)as*mut u8, ::unity::Il2CppString;
176(*mut Boolean)self as*mut Boolean)
177 }
178 }
179
180 #[doc = "`Equals(crate::system::object::Object)` overload"]
181 pub fn equals(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
182 unsafe {
183 ::unity::il2cpp_call!((::unity::module_base()+0x33932c0usize)as*mut u8,bool;
184(*mut Boolean)self as*mut Boolean,(crate::system::object::Object)::core::convert::Into::into(obj))
185 }
186 }
187
188 #[doc = "`Equals(bool)` overload"]
189 pub fn equals_2(&mut self, obj: impl ::core::convert::Into<bool>) -> bool {
190 unsafe {
191 ::unity::il2cpp_call!((::unity::module_base()+0x3393350usize)as*mut u8,bool;
192(*mut Boolean)self as*mut Boolean,(bool)::core::convert::Into::into(obj))
193 }
194 }
195
196 #[doc = "`CompareTo(crate::system::object::Object)` overload"]
197 pub fn compare_to(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
198 unsafe {
199 ::unity::il2cpp_call!((::unity::module_base()+0x3393370usize)as*mut u8,i32;
200(*mut Boolean)self as*mut Boolean,(crate::system::object::Object)::core::convert::Into::into(obj))
201 }
202 }
203
204 #[doc = "`CompareTo(bool)` overload"]
205 pub fn compare_to_2(&mut self, value: impl ::core::convert::Into<bool>) -> i32 {
206 unsafe {
207 ::unity::il2cpp_call!((::unity::module_base()+0x3393480usize)as*mut u8,i32;
208(*mut Boolean)self as*mut Boolean,(bool)::core::convert::Into::into(value))
209 }
210 }
211}
212
213#[cfg(feature = "system-boolean")]
214impl Boolean {
215 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
216 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
217 }
218
219 pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
220 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
221 }
222
223 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
224 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
225 }
226
227 pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
228 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
229 }
230
231 pub fn compare_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
232 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
233 }
234
235 pub fn compare_to_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
236 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
237 }
238
239 pub fn parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
240 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
241 }
242
243 pub fn try_parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
244 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
245 }
246
247 pub fn trim_white_space_and_null_method_info() -> &'static ::unity::il2cpp::MethodInfo {
248 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
249 }
250
251 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
252 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
253 }
254}
255
256#[cfg(feature = "system-boolean")]
257#[doc(hidden)]
258pub mod prelude {
259 pub use super::Boolean;
260 #[cfg(feature = "system-object")]
261 pub use crate::system::object::IObjectMethods;
262 #[cfg(feature = "system-valuetype")]
263 pub use crate::system::valuetype::IValueTypeMethods;
264 pub use crate::system::{object::IObject, valuetype::IValueType};
265}