Skip to main content

engage/generated/system/
enum.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-enum-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/enum/Enum.md"))]
14    #[::unity::class(namespace = "System", name = "Enum")]
15    #[parent(crate::system::valuetype::ValueType)]
16    pub struct Enum {
17        #[static_field]
18        #[rename(name = "enumSeperatorCharArray")]
19        pub enum_seperator_char_array: ::unity::Array<u16>,
20        #[static_field]
21        #[rename(name = "enumSeperator")]
22        pub enum_seperator: ::unity::Il2CppString,
23    }
24}
25
26#[cfg(feature = "system-enum-types")]
27pub use __types::*;
28
29#[cfg(feature = "system-enum")]
30impl Enum {
31    #[doc = "`InternalFormattedHexString(crate::system::object::Object)` overload"]
32    pub fn internal_formatted_hex_string(value: impl ::core::convert::Into<crate::system::object::Object>) -> ::unity::Il2CppString {
33        unsafe {
34            ::unity::il2cpp_call!((::unity::module_base()+0x3acbec0usize)as*mut u8, ::unity::Il2CppString;
35(crate::system::object::Object)::core::convert::Into::into(value))
36        }
37    }
38
39    #[doc = "`InternalFormat(crate::system::runtimetype::RuntimeType, crate::system::object::Object)` overload"]
40    pub fn internal_format(
41        e_t: impl ::core::convert::Into<crate::system::runtimetype::RuntimeType>,
42        value: impl ::core::convert::Into<crate::system::object::Object>,
43    ) -> ::unity::Il2CppString {
44        unsafe {
45            ::unity::il2cpp_call!((::unity::module_base()+0x3acc3a0usize)as*mut u8, ::unity::Il2CppString;
46(crate::system::runtimetype::RuntimeType)::core::convert::Into::into(e_t),(crate::system::object::Object)::core::convert::Into::into(value))
47        }
48    }
49
50    #[doc = "`InternalFlagsFormat(crate::system::runtimetype::RuntimeType, crate::system::object::Object)` overload"]
51    pub fn internal_flags_format(
52        e_t: impl ::core::convert::Into<crate::system::runtimetype::RuntimeType>,
53        value: impl ::core::convert::Into<crate::system::object::Object>,
54    ) -> ::unity::Il2CppString {
55        unsafe {
56            ::unity::il2cpp_call!((::unity::module_base()+0x3acc5d0usize)as*mut u8, ::unity::Il2CppString;
57(crate::system::runtimetype::RuntimeType)::core::convert::Into::into(e_t),(crate::system::object::Object)::core::convert::Into::into(value))
58        }
59    }
60
61    #[doc = "`ToUInt64(crate::system::object::Object)` overload"]
62    pub fn to_u_int64(value: impl ::core::convert::Into<crate::system::object::Object>) -> u64 {
63        unsafe {
64            ::unity::il2cpp_call!((::unity::module_base()+0x3acc7f0usize)as*mut u8,u64;
65(crate::system::object::Object)::core::convert::Into::into(value))
66        }
67    }
68
69    #[doc = "`InternalCompareTo(crate::system::object::Object, crate::system::object::Object)` overload"]
70    pub fn internal_compare_to(
71        o1: impl ::core::convert::Into<crate::system::object::Object>,
72        o2: impl ::core::convert::Into<crate::system::object::Object>,
73    ) -> i32 {
74        unsafe {
75            ::unity::il2cpp_call!((::unity::module_base()+0x3acc990usize)as*mut u8,i32;
76(crate::system::object::Object)::core::convert::Into::into(o1),(crate::system::object::Object)::core::convert::Into::into(o2))
77        }
78    }
79
80    #[doc = "`InternalGetUnderlyingType(crate::system::runtimetype::RuntimeType)` overload"]
81    pub fn internal_get_underlying_type(
82        enum_type: impl ::core::convert::Into<crate::system::runtimetype::RuntimeType>,
83    ) -> crate::system::runtimetype::RuntimeType {
84        unsafe {
85            ::unity::il2cpp_call!((::unity::module_base()+0x3acc9a0usize)as*mut u8,crate::system::runtimetype::RuntimeType;
86(crate::system::runtimetype::RuntimeType)::core::convert::Into::into(enum_type))
87        }
88    }
89
90    #[doc = "`GetEnumValuesAndNames(crate::system::runtimetype::RuntimeType, *mut::unity::Array<u64>, *mut::unity::Array<::unity::Il2CppString>)` overload"]
91    pub fn get_enum_values_and_names(
92        enum_type: impl ::core::convert::Into<crate::system::runtimetype::RuntimeType>,
93    ) -> (bool, ::unity::Array<u64>, ::unity::Array<::unity::Il2CppString>) {
94        unsafe {
95            let mut __out_0 = ::core::mem::MaybeUninit::<::unity::Array<u64>>::uninit();
96            let mut __out_1 = ::core::mem::MaybeUninit::<::unity::Array<::unity::Il2CppString>>::uninit();
97            let __ret = {
98                ::unity::il2cpp_call!((::unity::module_base()+0x3acbeb0usize)as*mut u8,bool;
99(crate::system::runtimetype::RuntimeType)::core::convert::Into::into(enum_type),(*mut::unity::Array<u64>)__out_0.as_mut_ptr(),(*mut::unity::Array< ::unity::Il2CppString>)__out_1.as_mut_ptr())
100            };
101            (__ret, __out_0.assume_init(), __out_1.assume_init())
102        }
103    }
104
105    #[doc = "`InternalBoxEnum(crate::system::runtimetype::RuntimeType, i64)` overload"]
106    pub fn internal_box_enum(
107        enum_type: impl ::core::convert::Into<crate::system::runtimetype::RuntimeType>,
108        value: impl ::core::convert::Into<i64>,
109    ) -> crate::system::object::Object {
110        unsafe {
111            ::unity::il2cpp_call!((::unity::module_base()+0x3acc9b0usize)as*mut u8,crate::system::object::Object;
112(crate::system::runtimetype::RuntimeType)::core::convert::Into::into(enum_type),(i64)::core::convert::Into::into(value))
113        }
114    }
115
116    pub fn try_parse<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
117        value: impl ::core::convert::Into<::unity::Il2CppString>,
118        ignore_case: impl ::core::convert::Into<bool>,
119        result: impl ::core::convert::Into<*mut M0>,
120    ) -> bool {
121        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
122            ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<Enum as ::unity::ClassIdentity>::class(), "TryParse", 3));
123        #[allow(clippy::type_complexity)]
124        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
125            ::std::sync::OnceLock::new();
126        let _ = true;
127        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
128            ::core::result::Result::Ok(mi) => *mi,
129            ::core::result::Result::Err(e) => {
130                panic!(
131                    "method lookup failed: {}
132::{}
133: {}
134",
135                    <Enum as ::unity::ClassIdentity>::NAME,
136                    "TryParse",
137                    e
138                )
139            },
140        };
141        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
142        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
143        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
144            let mut __guard = __cache.lock().unwrap();
145            *__guard
146                .entry(__key)
147                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
148        };
149        unsafe {
150            let __f: extern "C" fn(::unity::Il2CppString, bool, *mut M0, ::unity::OptionalMethod) -> bool =
151                ::core::mem::transmute(__inflated.method_ptr);
152            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
153            __f(
154                ::core::convert::Into::into(value),
155                ::core::convert::Into::into(ignore_case),
156                ::core::convert::Into::into(result),
157                ::core::option::Option::Some(__mi_opaque),
158            )
159        }
160    }
161
162    #[doc = "`Parse(::unity::SystemType, ::unity::Il2CppString, bool)` overload"]
163    pub fn parse(
164        enum_type: impl ::core::convert::Into<::unity::SystemType>,
165        value: impl ::core::convert::Into<::unity::Il2CppString>,
166        ignore_case: impl ::core::convert::Into<bool>,
167    ) -> crate::system::object::Object {
168        unsafe {
169            ::unity::il2cpp_call!((::unity::module_base()+0x3acc9c0usize)as*mut u8,crate::system::object::Object;
170(::unity::SystemType)::core::convert::Into::into(enum_type),(::unity::Il2CppString)::core::convert::Into::into(value),(bool)::core::convert::Into::into(ignore_case))
171        }
172    }
173
174    #[doc = "`GetUnderlyingType(::unity::SystemType)` overload"]
175    pub fn get_underlying_type(enum_type: impl ::core::convert::Into<::unity::SystemType>) -> ::unity::SystemType {
176        unsafe {
177            ::unity::il2cpp_call!((::unity::module_base()+0x3acd290usize)as*mut u8, ::unity::SystemType;
178(::unity::SystemType)::core::convert::Into::into(enum_type))
179        }
180    }
181
182    #[doc = "`GetValues(::unity::SystemType)` overload"]
183    pub fn get_values(enum_type: impl ::core::convert::Into<::unity::SystemType>) -> ::unity::IlInstance {
184        unsafe {
185            ::unity::il2cpp_call!((::unity::module_base()+0x3acdb00usize)as*mut u8, ::unity::IlInstance;
186(::unity::SystemType)::core::convert::Into::into(enum_type))
187        }
188    }
189
190    #[doc = "`InternalGetValues(crate::system::runtimetype::RuntimeType)` overload"]
191    pub fn internal_get_values(enum_type: impl ::core::convert::Into<crate::system::runtimetype::RuntimeType>) -> ::unity::Array<u64> {
192        unsafe {
193            ::unity::il2cpp_call!((::unity::module_base()+0x3acdbd0usize)as*mut u8, ::unity::Array<u64> ;
194(crate::system::runtimetype::RuntimeType)::core::convert::Into::into(enum_type))
195        }
196    }
197
198    #[doc = "`GetName(::unity::SystemType, crate::system::object::Object)` overload"]
199    pub fn get_name(
200        enum_type: impl ::core::convert::Into<::unity::SystemType>,
201        value: impl ::core::convert::Into<crate::system::object::Object>,
202    ) -> ::unity::Il2CppString {
203        unsafe {
204            ::unity::il2cpp_call!((::unity::module_base()+0x3acc4f0usize)as*mut u8, ::unity::Il2CppString;
205(::unity::SystemType)::core::convert::Into::into(enum_type),(crate::system::object::Object)::core::convert::Into::into(value))
206        }
207    }
208
209    #[doc = "`GetNames(::unity::SystemType)` overload"]
210    pub fn get_names(enum_type: impl ::core::convert::Into<::unity::SystemType>) -> ::unity::Array<::unity::Il2CppString> {
211        unsafe {
212            ::unity::il2cpp_call!((::unity::module_base()+0x3acdc50usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
213(::unity::SystemType)::core::convert::Into::into(enum_type))
214        }
215    }
216
217    #[doc = "`InternalGetNames(crate::system::runtimetype::RuntimeType)` overload"]
218    pub fn internal_get_names(
219        enum_type: impl ::core::convert::Into<crate::system::runtimetype::RuntimeType>,
220    ) -> ::unity::Array<::unity::Il2CppString> {
221        unsafe {
222            ::unity::il2cpp_call!((::unity::module_base()+0x3acdd20usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
223(crate::system::runtimetype::RuntimeType)::core::convert::Into::into(enum_type))
224        }
225    }
226
227    #[doc = "`ToObject(::unity::SystemType, crate::system::object::Object)` overload"]
228    pub fn to_object(
229        enum_type: impl ::core::convert::Into<::unity::SystemType>,
230        value: impl ::core::convert::Into<crate::system::object::Object>,
231    ) -> crate::system::object::Object {
232        unsafe {
233            ::unity::il2cpp_call!((::unity::module_base()+0x3acd360usize)as*mut u8,crate::system::object::Object;
234(::unity::SystemType)::core::convert::Into::into(enum_type),(crate::system::object::Object)::core::convert::Into::into(value))
235        }
236    }
237
238    #[doc = "`IsDefined(::unity::SystemType, crate::system::object::Object)` overload"]
239    pub fn is_defined(
240        enum_type: impl ::core::convert::Into<::unity::SystemType>,
241        value: impl ::core::convert::Into<crate::system::object::Object>,
242    ) -> bool {
243        unsafe {
244            ::unity::il2cpp_call!((::unity::module_base()+0x3acef20usize)as*mut u8,bool;
245(::unity::SystemType)::core::convert::Into::into(enum_type),(crate::system::object::Object)::core::convert::Into::into(value))
246        }
247    }
248
249    #[doc = "`ToObject(::unity::SystemType, i8)` overload"]
250    pub fn to_object_2(
251        enum_type: impl ::core::convert::Into<::unity::SystemType>,
252        value: impl ::core::convert::Into<i8>,
253    ) -> crate::system::object::Object {
254        unsafe {
255            ::unity::il2cpp_call!((::unity::module_base()+0x3acdf90usize)as*mut u8,crate::system::object::Object;
256(::unity::SystemType)::core::convert::Into::into(enum_type),(i8)::core::convert::Into::into(value))
257        }
258    }
259
260    #[doc = "`ToObject(::unity::SystemType, i16)` overload"]
261    pub fn to_object_3(
262        enum_type: impl ::core::convert::Into<::unity::SystemType>,
263        value: impl ::core::convert::Into<i16>,
264    ) -> crate::system::object::Object {
265        unsafe {
266            ::unity::il2cpp_call!((::unity::module_base()+0x3ace180usize)as*mut u8,crate::system::object::Object;
267(::unity::SystemType)::core::convert::Into::into(enum_type),(i16)::core::convert::Into::into(value))
268        }
269    }
270
271    #[doc = "`ToObject(::unity::SystemType, i32)` overload"]
272    pub fn to_object_4(
273        enum_type: impl ::core::convert::Into<::unity::SystemType>,
274        value: impl ::core::convert::Into<i32>,
275    ) -> crate::system::object::Object {
276        unsafe {
277            ::unity::il2cpp_call!((::unity::module_base()+0x3acdda0usize)as*mut u8,crate::system::object::Object;
278(::unity::SystemType)::core::convert::Into::into(enum_type),(i32)::core::convert::Into::into(value))
279        }
280    }
281
282    #[doc = "`ToObject(::unity::SystemType, u8)` overload"]
283    pub fn to_object_5(
284        enum_type: impl ::core::convert::Into<::unity::SystemType>,
285        value: impl ::core::convert::Into<u8>,
286    ) -> crate::system::object::Object {
287        unsafe {
288            ::unity::il2cpp_call!((::unity::module_base()+0x3ace750usize)as*mut u8,crate::system::object::Object;
289(::unity::SystemType)::core::convert::Into::into(enum_type),(u8)::core::convert::Into::into(value))
290        }
291    }
292
293    #[doc = "`ToObject(::unity::SystemType, u16)` overload"]
294    pub fn to_object_6(
295        enum_type: impl ::core::convert::Into<::unity::SystemType>,
296        value: impl ::core::convert::Into<u16>,
297    ) -> crate::system::object::Object {
298        unsafe {
299            ::unity::il2cpp_call!((::unity::module_base()+0x3ace940usize)as*mut u8,crate::system::object::Object;
300(::unity::SystemType)::core::convert::Into::into(enum_type),(u16)::core::convert::Into::into(value))
301        }
302    }
303
304    #[doc = "`ToObject(::unity::SystemType, u32)` overload"]
305    pub fn to_object_7(
306        enum_type: impl ::core::convert::Into<::unity::SystemType>,
307        value: impl ::core::convert::Into<u32>,
308    ) -> crate::system::object::Object {
309        unsafe {
310            ::unity::il2cpp_call!((::unity::module_base()+0x3ace560usize)as*mut u8,crate::system::object::Object;
311(::unity::SystemType)::core::convert::Into::into(enum_type),(u32)::core::convert::Into::into(value))
312        }
313    }
314
315    #[doc = "`ToObject(::unity::SystemType, i64)` overload"]
316    pub fn to_object_8(
317        enum_type: impl ::core::convert::Into<::unity::SystemType>,
318        value: impl ::core::convert::Into<i64>,
319    ) -> crate::system::object::Object {
320        unsafe {
321            ::unity::il2cpp_call!((::unity::module_base()+0x3ace370usize)as*mut u8,crate::system::object::Object;
322(::unity::SystemType)::core::convert::Into::into(enum_type),(i64)::core::convert::Into::into(value))
323        }
324    }
325
326    #[doc = "`ToObject(::unity::SystemType, u64)` overload"]
327    pub fn to_object_9(
328        enum_type: impl ::core::convert::Into<::unity::SystemType>,
329        value: impl ::core::convert::Into<u64>,
330    ) -> crate::system::object::Object {
331        unsafe {
332            ::unity::il2cpp_call!((::unity::module_base()+0x3acd910usize)as*mut u8,crate::system::object::Object;
333(::unity::SystemType)::core::convert::Into::into(enum_type),(u64)::core::convert::Into::into(value))
334        }
335    }
336
337    #[doc = "`ToObject(::unity::SystemType, bool)` overload"]
338    pub fn to_object_10(
339        enum_type: impl ::core::convert::Into<::unity::SystemType>,
340        value: impl ::core::convert::Into<bool>,
341    ) -> crate::system::object::Object {
342        unsafe {
343            ::unity::il2cpp_call!((::unity::module_base()+0x3aced20usize)as*mut u8,crate::system::object::Object;
344(::unity::SystemType)::core::convert::Into::into(enum_type),(bool)::core::convert::Into::into(value))
345        }
346    }
347
348    #[doc = "`.cctor()` overload"]
349    pub fn cctor() -> () {
350        unsafe {
351            ::unity::il2cpp_call!((::unity::module_base()+0x3ad0790usize)as*mut u8,();
352            )
353        }
354    }
355}
356
357#[cfg(feature = "system-enum")]
358pub trait IEnumMethods: IEnum {
359    #[doc = "`get_value()` overload"]
360    fn get_value(self) -> crate::system::object::Object {
361        unsafe {
362            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
363            ::unity::il2cpp_call!((::unity::module_base()+0x3acf000usize)as*mut u8,crate::system::object::Object;
364(Enum)__receiver)
365        }
366    }
367    #[doc = "`InternalHasFlag(crate::system::r#enum::Enum)` overload"]
368    fn internal_has_flag(self, flags: impl ::core::convert::Into<crate::system::r#enum::Enum>) -> bool {
369        unsafe {
370            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
371            ::unity::il2cpp_call!((::unity::module_base()+0x3acf020usize)as*mut u8,bool;
372(Enum)__receiver,(crate::system::r#enum::Enum)::core::convert::Into::into(flags))
373        }
374    }
375    #[doc = "`get_hashcode()` overload"]
376    fn get_hashcode(self) -> i32 {
377        unsafe {
378            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
379            ::unity::il2cpp_call!((::unity::module_base()+0x3acf030usize)as*mut u8,i32;
380(Enum)__receiver)
381        }
382    }
383    #[doc = "`Equals(crate::system::object::Object)` overload"]
384    fn equals(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
385        unsafe {
386            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
387            {
388                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
389                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
390                    panic!(
391                        "unity: virtual slot {}
392 out of range (vtable len {}
393) on the runtime class behind {}
394 (method `{}
395`)",
396                        0usize,
397                        __vt.len(),
398                        <Enum as ::unity::ClassIdentity>::NAME,
399                        "Equals",
400                    )
401                });
402                let __inner: extern "C" fn(Enum, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
403                    ::core::mem::transmute(__vi.method_ptr);
404                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
405                __inner(__receiver, ::core::convert::Into::into(obj), __mi)
406            }
407        }
408    }
409    #[doc = "`GetHashCode()` overload"]
410    fn get_hash_code(self) -> i32 {
411        unsafe {
412            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
413            {
414                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
415                let __vi = *__vt.get(2usize).unwrap_or_else(|| {
416                    panic!(
417                        "unity: virtual slot {}
418 out of range (vtable len {}
419) on the runtime class behind {}
420 (method `{}
421`)",
422                        2usize,
423                        __vt.len(),
424                        <Enum as ::unity::ClassIdentity>::NAME,
425                        "GetHashCode",
426                    )
427                });
428                let __inner: extern "C" fn(Enum, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
429                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
430                __inner(__receiver, __mi)
431            }
432        }
433    }
434    #[doc = "`ToString()` overload"]
435    fn to_string(self) -> ::unity::Il2CppString {
436        unsafe {
437            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
438            {
439                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
440                let __vi = *__vt.get(3usize).unwrap_or_else(|| {
441                    panic!(
442                        "unity: virtual slot {}
443 out of range (vtable len {}
444) on the runtime class behind {}
445 (method `{}
446`)",
447                        3usize,
448                        __vt.len(),
449                        <Enum as ::unity::ClassIdentity>::NAME,
450                        "ToString",
451                    )
452                });
453                let __inner: extern "C" fn(Enum, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
454                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
455                __inner(__receiver, __mi)
456            }
457        }
458    }
459    #[doc = "`CompareTo(crate::system::object::Object)` overload"]
460    fn compare_to(self, target: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
461        unsafe {
462            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
463            {
464                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
465                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
466                    panic!(
467                        "unity: virtual slot {}
468 out of range (vtable len {}
469) on the runtime class behind {}
470 (method `{}
471`)",
472                        4usize,
473                        __vt.len(),
474                        <Enum as ::unity::ClassIdentity>::NAME,
475                        "CompareTo",
476                    )
477                });
478                let __inner: extern "C" fn(Enum, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
479                    ::core::mem::transmute(__vi.method_ptr);
480                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
481                __inner(__receiver, ::core::convert::Into::into(target), __mi)
482            }
483        }
484    }
485    #[doc = "`ToString(::unity::Il2CppString)` overload"]
486    fn to_string_2(self, format: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
487        unsafe {
488            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
489            ::unity::il2cpp_call!((::unity::module_base()+0x3acf150usize)as*mut u8, ::unity::Il2CppString;
490(Enum)__receiver,(::unity::Il2CppString)::core::convert::Into::into(format))
491        }
492    }
493    #[doc = "`HasFlag(crate::system::r#enum::Enum)` overload"]
494    fn has_flag(self, flag: impl ::core::convert::Into<crate::system::r#enum::Enum>) -> bool {
495        unsafe {
496            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
497            ::unity::il2cpp_call!((::unity::module_base()+0x3acf620usize)as*mut u8,bool;
498(Enum)__receiver,(crate::system::r#enum::Enum)::core::convert::Into::into(flag))
499        }
500    }
501    #[doc = "`.ctor()` overload"]
502    fn ctor(self) -> () {
503        unsafe {
504            let __receiver = <Enum as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
505            ::unity::il2cpp_call!((::unity::module_base()+0x3ad0780usize)as*mut u8,();
506(Enum)__receiver)
507        }
508    }
509}
510
511#[cfg(feature = "system-enum")]
512impl<__T: IEnum> IEnumMethods for __T {}
513
514#[cfg(feature = "system-enum")]
515impl Enum {
516    pub fn internal_formatted_hex_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
517        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
518    }
519
520    pub fn internal_format_method_info() -> &'static ::unity::il2cpp::MethodInfo {
521        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
522    }
523
524    pub fn internal_flags_format_method_info() -> &'static ::unity::il2cpp::MethodInfo {
525        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
526    }
527
528    pub fn to_u_int64_method_info() -> &'static ::unity::il2cpp::MethodInfo {
529        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
530    }
531
532    pub fn internal_compare_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
533        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
534    }
535
536    pub fn internal_get_underlying_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
537        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
538    }
539
540    pub fn get_enum_values_and_names_method_info() -> &'static ::unity::il2cpp::MethodInfo {
541        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
542    }
543
544    pub fn internal_box_enum_method_info() -> &'static ::unity::il2cpp::MethodInfo {
545        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
546    }
547
548    pub fn parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
549        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
550    }
551
552    pub fn get_underlying_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
553        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
554    }
555
556    pub fn get_values_method_info() -> &'static ::unity::il2cpp::MethodInfo {
557        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
558    }
559
560    pub fn internal_get_values_method_info() -> &'static ::unity::il2cpp::MethodInfo {
561        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
562    }
563
564    pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
565        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
566    }
567
568    pub fn get_names_method_info() -> &'static ::unity::il2cpp::MethodInfo {
569        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
570    }
571
572    pub fn internal_get_names_method_info() -> &'static ::unity::il2cpp::MethodInfo {
573        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
574    }
575
576    pub fn to_object_method_info() -> &'static ::unity::il2cpp::MethodInfo {
577        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
578    }
579
580    pub fn is_defined_method_info() -> &'static ::unity::il2cpp::MethodInfo {
581        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
582    }
583
584    pub fn get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
585        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
586    }
587
588    pub fn internal_has_flag_method_info() -> &'static ::unity::il2cpp::MethodInfo {
589        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
590    }
591
592    pub fn get_hashcode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
593        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
594    }
595
596    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
597        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
598    }
599
600    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
601        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
602    }
603
604    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
605        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
606    }
607
608    pub fn compare_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
609        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[28]
610    }
611
612    pub fn to_string_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
613        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[29]
614    }
615
616    pub fn has_flag_method_info() -> &'static ::unity::il2cpp::MethodInfo {
617        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[31]
618    }
619
620    pub fn to_object_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
621        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[48]
622    }
623
624    pub fn to_object_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
625        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[49]
626    }
627
628    pub fn to_object_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
629        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[50]
630    }
631
632    pub fn to_object_5_method_info() -> &'static ::unity::il2cpp::MethodInfo {
633        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[51]
634    }
635
636    pub fn to_object_6_method_info() -> &'static ::unity::il2cpp::MethodInfo {
637        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[52]
638    }
639
640    pub fn to_object_7_method_info() -> &'static ::unity::il2cpp::MethodInfo {
641        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[53]
642    }
643
644    pub fn to_object_8_method_info() -> &'static ::unity::il2cpp::MethodInfo {
645        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[54]
646    }
647
648    pub fn to_object_9_method_info() -> &'static ::unity::il2cpp::MethodInfo {
649        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[55]
650    }
651
652    pub fn to_object_10_method_info() -> &'static ::unity::il2cpp::MethodInfo {
653        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[57]
654    }
655
656    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
657        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[58]
658    }
659
660    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
661        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[59]
662    }
663}
664
665#[cfg(feature = "system-enum")]
666impl Enum {
667    #[doc = "Direct (non-virtual) call to `Enum`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
668    pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
669        let __mi = Self::equals_method_info();
670        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
671            ::core::mem::transmute(__mi.method_ptr);
672        __inner(this.into(), obj, ::core::option::Option::None)
673    }
674
675    #[doc = "Direct (non-virtual) call to `Enum`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
676    pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
677        let __mi = Self::get_hash_code_method_info();
678        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
679        __inner(this.into(), ::core::option::Option::None)
680    }
681
682    #[doc = "Direct (non-virtual) call to `Enum`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
683    pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
684        let __mi = Self::to_string_method_info();
685        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
686        __inner(this.into(), ::core::option::Option::None)
687    }
688
689    #[doc = "Direct (non-virtual) call to `Enum`'s own `CompareTo`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
690    pub unsafe fn compare_to(this: impl ::core::convert::Into<::unity::IlInstance>, target: crate::system::object::Object) -> i32 {
691        let __mi = Self::compare_to_method_info();
692        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
693            ::core::mem::transmute(__mi.method_ptr);
694        __inner(this.into(), target, ::core::option::Option::None)
695    }
696}
697
698#[cfg(feature = "system-enum")]
699impl Enum {
700    #[doc = "`.ctor()` — no args"]
701    pub fn new() -> Self {
702        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
703            panic!(
704                "{}
705::{}
706 failed to instantiate",
707                ::core::stringify!(Enum),
708                ::core::stringify!(new),
709            )
710        });
711        <Self as IEnumMethods>::ctor(this);
712        this
713    }
714}
715
716#[cfg(feature = "system-enum")]
717#[doc(hidden)]
718pub mod prelude {
719    pub use super::{Enum, IEnum, IEnumMethods};
720    #[cfg(feature = "system-object")]
721    pub use crate::system::object::IObjectMethods;
722    #[cfg(feature = "system-valuetype")]
723    pub use crate::system::valuetype::IValueTypeMethods;
724    pub use crate::system::{object::IObject, valuetype::IValueType};
725}