Skip to main content

engage/generated/app/
structbase.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-structbase-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/structbase/StructBase.md"))]
11    #[::unity::class(namespace = "App", name = "StructBase")]
12    #[parent(crate::system::object::Object)]
13    pub struct StructBase {
14        #[offset(16)]
15        #[rename(name = "Index")]
16        pub index: i32,
17        #[offset(20)]
18        #[rename(name = "Hash")]
19        pub hash: i32,
20        #[offset(24)]
21        #[rename(name = "Key")]
22        pub key: ::unity::Il2CppString,
23    }
24}
25
26#[cfg(feature = "app-structbase-types")]
27pub use __types::*;
28
29#[cfg(feature = "app-structbase")]
30pub trait IStructBaseMethods: IStructBase {
31    #[doc = "`OnBuild()` overload"]
32    fn on_build(self) -> () {
33        unsafe {
34            let __receiver = <StructBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35            {
36                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
37                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
38                    panic!(
39                        "unity: virtual slot {}
40 out of range (vtable len {}
41) on the runtime class behind {}
42 (method `{}
43`)",
44                        4usize,
45                        __vt.len(),
46                        <StructBase as ::unity::ClassIdentity>::NAME,
47                        "OnBuild",
48                    )
49                });
50                let __inner: extern "C" fn(StructBase, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
51                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
52                __inner(__receiver, __mi)
53            }
54        }
55    }
56    #[doc = "`OnCompleted()` overload"]
57    fn on_completed(self) -> () {
58        unsafe {
59            let __receiver = <StructBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
60            {
61                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
62                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
63                    panic!(
64                        "unity: virtual slot {}
65 out of range (vtable len {}
66) on the runtime class behind {}
67 (method `{}
68`)",
69                        5usize,
70                        __vt.len(),
71                        <StructBase as ::unity::ClassIdentity>::NAME,
72                        "OnCompleted",
73                    )
74                });
75                let __inner: extern "C" fn(StructBase, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
76                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
77                __inner(__receiver, __mi)
78            }
79        }
80    }
81    #[doc = "`OnCompletedEnd()` overload"]
82    fn on_completed_end(self) -> () {
83        unsafe {
84            let __receiver = <StructBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
85            {
86                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
87                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
88                    panic!(
89                        "unity: virtual slot {}
90 out of range (vtable len {}
91) on the runtime class behind {}
92 (method `{}
93`)",
94                        6usize,
95                        __vt.len(),
96                        <StructBase as ::unity::ClassIdentity>::NAME,
97                        "OnCompletedEnd",
98                    )
99                });
100                let __inner: extern "C" fn(StructBase, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
101                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
102                __inner(__receiver, __mi)
103            }
104        }
105    }
106    #[doc = "`OnRelease()` overload"]
107    fn on_release(self) -> () {
108        unsafe {
109            let __receiver = <StructBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
110            {
111                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
112                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
113                    panic!(
114                        "unity: virtual slot {}
115 out of range (vtable len {}
116) on the runtime class behind {}
117 (method `{}
118`)",
119                        7usize,
120                        __vt.len(),
121                        <StructBase as ::unity::ClassIdentity>::NAME,
122                        "OnRelease",
123                    )
124                });
125                let __inner: extern "C" fn(StructBase, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
126                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
127                __inner(__receiver, __mi)
128            }
129        }
130    }
131    #[doc = "`GetDebugName()` overload"]
132    fn get_debug_name(self) -> ::unity::Il2CppString {
133        unsafe {
134            let __receiver = <StructBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
135            {
136                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
137                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
138                    panic!(
139                        "unity: virtual slot {}
140 out of range (vtable len {}
141) on the runtime class behind {}
142 (method `{}
143`)",
144                        8usize,
145                        __vt.len(),
146                        <StructBase as ::unity::ClassIdentity>::NAME,
147                        "GetDebugName",
148                    )
149                });
150                let __inner: extern "C" fn(StructBase, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
151                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
152                __inner(__receiver, __mi)
153            }
154        }
155    }
156    #[doc = "`GetIndex()` overload"]
157    fn get_index(self) -> i32 {
158        unsafe {
159            let __receiver = <StructBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
160            ::unity::il2cpp_call!((::unity::module_base()+0x250ae50usize)as*mut u8,i32;
161(StructBase)__receiver)
162        }
163    }
164    #[doc = "`.ctor()` overload"]
165    fn ctor(self) -> () {
166        unsafe {
167            let __receiver = <StructBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
168            ::unity::il2cpp_call!((::unity::module_base()+0x250ae60usize)as*mut u8,();
169(StructBase)__receiver)
170        }
171    }
172}
173
174#[cfg(feature = "app-structbase")]
175impl<__T: IStructBase> IStructBaseMethods for __T {}
176
177#[cfg(feature = "app-structbase")]
178impl StructBase {
179    pub fn on_build_method_info() -> &'static ::unity::il2cpp::MethodInfo {
180        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
181    }
182
183    pub fn on_completed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
184        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
185    }
186
187    pub fn on_completed_end_method_info() -> &'static ::unity::il2cpp::MethodInfo {
188        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
189    }
190
191    pub fn on_release_method_info() -> &'static ::unity::il2cpp::MethodInfo {
192        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
193    }
194
195    pub fn get_debug_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
196        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
197    }
198
199    pub fn get_index_method_info() -> &'static ::unity::il2cpp::MethodInfo {
200        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
201    }
202
203    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
204        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
205    }
206}
207
208#[cfg(feature = "app-structbase")]
209impl StructBase {
210    #[doc = "Direct (non-virtual) call to `StructBase`'s own `OnBuild`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
211    pub unsafe fn on_build(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
212        let __mi = Self::on_build_method_info();
213        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
214        __inner(this.into(), ::core::option::Option::None)
215    }
216
217    #[doc = "Direct (non-virtual) call to `StructBase`'s own `OnCompleted`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
218    pub unsafe fn on_completed(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
219        let __mi = Self::on_completed_method_info();
220        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
221        __inner(this.into(), ::core::option::Option::None)
222    }
223
224    #[doc = "Direct (non-virtual) call to `StructBase`'s own `OnCompletedEnd`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
225    pub unsafe fn on_completed_end(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
226        let __mi = Self::on_completed_end_method_info();
227        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
228        __inner(this.into(), ::core::option::Option::None)
229    }
230
231    #[doc = "Direct (non-virtual) call to `StructBase`'s own `OnRelease`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
232    pub unsafe fn on_release(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
233        let __mi = Self::on_release_method_info();
234        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
235        __inner(this.into(), ::core::option::Option::None)
236    }
237
238    #[doc = "Direct (non-virtual) call to `StructBase`'s own `GetDebugName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
239    pub unsafe fn get_debug_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
240        let __mi = Self::get_debug_name_method_info();
241        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
242        __inner(this.into(), ::core::option::Option::None)
243    }
244}
245
246#[cfg(feature = "app-structbase")]
247impl StructBase {
248    #[doc = "`.ctor()` — no args"]
249    pub fn new() -> Self {
250        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
251            panic!(
252                "{}
253::{}
254 failed to instantiate",
255                ::core::stringify!(StructBase),
256                ::core::stringify!(new),
257            )
258        });
259        <Self as IStructBaseMethods>::ctor(this);
260        this
261    }
262}
263
264#[cfg(feature = "app-structbase")]
265#[doc(hidden)]
266pub mod prelude {
267    pub use super::{IStructBase, IStructBaseMethods, StructBase};
268    pub use crate::system::object::IObject;
269    #[cfg(feature = "system-object")]
270    pub use crate::system::object::IObjectMethods;
271}