Skip to main content

engage/generated/moon_sharp/interpreter/interop/
arraymemberdescriptor.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        moon_sharp::interpreter::interop::{
10            functionmemberdescriptorbase::{FunctionMemberDescriptorBase, IFunctionMemberDescriptorBase},
11            objectcallbackmemberdescriptor::{IObjectCallbackMemberDescriptor, ObjectCallbackMemberDescriptor},
12        },
13        system::object::{IObject, Object},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/interop/arraymemberdescriptor/ArrayMemberDescriptor.md"))]
17    #[::unity::class(namespace = "MoonSharp.Interpreter.Interop", name = "ArrayMemberDescriptor")]
18    #[parent(crate::moon_sharp::interpreter::interop::objectcallbackmemberdescriptor::ObjectCallbackMemberDescriptor)]
19    pub struct ArrayMemberDescriptor {
20        #[offset(80)]
21        #[rename(name = "m_IsSetter")]
22        pub m_is_setter: bool,
23    }
24}
25
26#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor-types")]
27pub use __types::*;
28
29#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor")]
30#[doc(hidden)]
31#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
32mod __ArrayMemberDescriptor_unity_raw {
33    use super::*;
34    #[doc(hidden)]
35    #[allow(non_snake_case)]
36    pub mod __lookup_ctor {
37        use super::*;
38        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
39            let param_types: &[& 'static::unity::il2cpp::Il2CppType]= &[< ::unity::Il2CppString as::unity::IlType> ::il_type(), <bool as::unity::IlType> ::il_type(), < ::unity::Array<crate::moon_sharp::interpreter::interop::basic_descriptors::parameterdescriptor::ParameterDescriptor>as::unity::IlType> ::il_type()];
40            ::unity::lookup::method_info_on_class_with_signature(
41                <ArrayMemberDescriptor as ::unity::ClassIdentity>::class(),
42                ".ctor",
43                3,
44                param_types,
45                false,
46            )
47        });
48        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
49            match &*METHOD {
50                ::core::result::Result::Ok(mi) => *mi,
51                ::core::result::Result::Err(e) => {
52                    panic!(
53                        "method lookup failed: {}
54::{}
55: {}
56",
57                        <ArrayMemberDescriptor as ::unity::ClassIdentity>::NAME,
58                        ".ctor",
59                        e
60                    )
61                },
62            }
63        }
64    }
65    #[doc(hidden)]
66    #[allow(non_snake_case)]
67    pub mod __lookup_ctor_2 {
68        use super::*;
69        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
70            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
71                <::unity::Il2CppString as ::unity::IlType>::il_type(),
72                <bool as ::unity::IlType>::il_type(),
73            ];
74            ::unity::lookup::method_info_on_class_with_signature(
75                <ArrayMemberDescriptor as ::unity::ClassIdentity>::class(),
76                ".ctor",
77                2,
78                param_types,
79                false,
80            )
81        });
82        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
83            match &*METHOD {
84                ::core::result::Result::Ok(mi) => *mi,
85                ::core::result::Result::Err(e) => {
86                    panic!(
87                        "method lookup failed: {}
88::{}
89: {}
90",
91                        <ArrayMemberDescriptor as ::unity::ClassIdentity>::NAME,
92                        ".ctor",
93                        e
94                    )
95                },
96            }
97        }
98    }
99    #[doc(hidden)]
100    #[allow(non_snake_case)]
101    pub mod __lookup_build_array_indices {
102        use super::*;
103        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
104            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
105                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
106                <i32 as ::unity::IlType>::il_type(),
107            ];
108            ::unity::lookup::method_info_on_class_with_signature(
109                <ArrayMemberDescriptor as ::unity::ClassIdentity>::class(),
110                "BuildArrayIndices",
111                2,
112                param_types,
113                true,
114            )
115        });
116        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
117            match &*METHOD {
118                ::core::result::Result::Ok(mi) => *mi,
119                ::core::result::Result::Err(e) => {
120                    panic!(
121                        "method lookup failed: {}
122::{}
123: {}
124",
125                        <ArrayMemberDescriptor as ::unity::ClassIdentity>::NAME,
126                        "BuildArrayIndices",
127                        e
128                    )
129                },
130            }
131        }
132    }
133    #[doc(hidden)]
134    #[allow(non_snake_case)]
135    pub mod __lookup_array_indexer_set {
136        use super::*;
137        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
138            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
139                <crate::system::object::Object as ::unity::IlType>::il_type(),
140                <crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type(),
141                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
142            ];
143            ::unity::lookup::method_info_on_class_with_signature(
144                <ArrayMemberDescriptor as ::unity::ClassIdentity>::class(),
145                "ArrayIndexerSet",
146                3,
147                param_types,
148                true,
149            )
150        });
151        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152            match &*METHOD {
153                ::core::result::Result::Ok(mi) => *mi,
154                ::core::result::Result::Err(e) => {
155                    panic!(
156                        "method lookup failed: {}
157::{}
158: {}
159",
160                        <ArrayMemberDescriptor as ::unity::ClassIdentity>::NAME,
161                        "ArrayIndexerSet",
162                        e
163                    )
164                },
165            }
166        }
167    }
168    #[doc(hidden)]
169    #[allow(non_snake_case)]
170    pub mod __lookup_array_indexer_get {
171        use super::*;
172        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
173            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
174                <crate::system::object::Object as ::unity::IlType>::il_type(),
175                <crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type(),
176                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
177            ];
178            ::unity::lookup::method_info_on_class_with_signature(
179                <ArrayMemberDescriptor as ::unity::ClassIdentity>::class(),
180                "ArrayIndexerGet",
181                3,
182                param_types,
183                true,
184            )
185        });
186        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
187            match &*METHOD {
188                ::core::result::Result::Ok(mi) => *mi,
189                ::core::result::Result::Err(e) => {
190                    panic!(
191                        "method lookup failed: {}
192::{}
193: {}
194",
195                        <ArrayMemberDescriptor as ::unity::ClassIdentity>::NAME,
196                        "ArrayIndexerGet",
197                        e
198                    )
199                },
200            }
201        }
202    }
203}
204
205#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor")]
206impl ArrayMemberDescriptor {
207    #[doc = "`BuildArrayIndices(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments, i32)` overload"]
208    pub fn build_array_indices(
209        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
210        count: impl ::core::convert::Into<i32>,
211    ) -> ::unity::Array<i32> {
212        unsafe {
213            ::unity::il2cpp_call!(__ArrayMemberDescriptor_unity_raw::__lookup_build_array_indices::get_method_info().method_ptr, ::unity::Array<i32> ;
214(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args),(i32)::core::convert::Into::into(count))
215        }
216    }
217
218    #[doc = "`ArrayIndexerSet(crate::system::object::Object, crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)` overload"]
219    pub fn array_indexer_set(
220        array_obj: impl ::core::convert::Into<crate::system::object::Object>,
221        ctx: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
222        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
223    ) -> crate::system::object::Object {
224        unsafe {
225            ::unity::il2cpp_call!(__ArrayMemberDescriptor_unity_raw::__lookup_array_indexer_set::get_method_info().method_ptr,crate::system::object::Object;
226(crate::system::object::Object)::core::convert::Into::into(array_obj),(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(ctx),(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args))
227        }
228    }
229
230    #[doc = "`ArrayIndexerGet(crate::system::object::Object, crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)` overload"]
231    pub fn array_indexer_get(
232        array_obj: impl ::core::convert::Into<crate::system::object::Object>,
233        ctx: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
234        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
235    ) -> crate::system::object::Object {
236        unsafe {
237            ::unity::il2cpp_call!(__ArrayMemberDescriptor_unity_raw::__lookup_array_indexer_get::get_method_info().method_ptr,crate::system::object::Object;
238(crate::system::object::Object)::core::convert::Into::into(array_obj),(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(ctx),(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args))
239        }
240    }
241}
242
243#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor")]
244pub trait IArrayMemberDescriptorMethods: IArrayMemberDescriptor {
245    #[doc = "`.ctor(::unity::Il2CppString, bool, ::unity::Array<crate::moon_sharp::interpreter::interop::basic_descriptors::parameterdescriptor::ParameterDescriptor>)` overload"]
246    fn ctor(
247        self,
248        name: impl ::core::convert::Into<::unity::Il2CppString>,
249        is_setter: impl ::core::convert::Into<bool>,
250        indexer_params: impl ::core::convert::Into<
251            ::unity::Array<crate::moon_sharp::interpreter::interop::basic_descriptors::parameterdescriptor::ParameterDescriptor>,
252        >,
253    ) -> () {
254        unsafe {
255            let __receiver = <ArrayMemberDescriptor as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
256            ::unity::il2cpp_call!(__ArrayMemberDescriptor_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
257(ArrayMemberDescriptor)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(bool)::core::convert::Into::into(is_setter),(::unity::Array<crate::moon_sharp::interpreter::interop::basic_descriptors::parameterdescriptor::ParameterDescriptor>)::core::convert::Into::into(indexer_params))
258        }
259    }
260    #[doc = "`.ctor(::unity::Il2CppString, bool)` overload"]
261    fn ctor_2(self, name: impl ::core::convert::Into<::unity::Il2CppString>, is_setter: impl ::core::convert::Into<bool>) -> () {
262        unsafe {
263            let __receiver = <ArrayMemberDescriptor as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
264            ::unity::il2cpp_call!(__ArrayMemberDescriptor_unity_raw::__lookup_ctor_2::get_method_info().method_ptr,();
265(ArrayMemberDescriptor)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(bool)::core::convert::Into::into(is_setter))
266        }
267    }
268    #[doc = "`PrepareForWiring(crate::moon_sharp::interpreter::table::Table)` overload"]
269    fn prepare_for_wiring(self, t: impl ::core::convert::Into<crate::moon_sharp::interpreter::table::Table>) -> () {
270        unsafe {
271            let __receiver = <ArrayMemberDescriptor as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
272            {
273                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
274                let __vi = *__vt.get(19usize).unwrap_or_else(|| {
275                    panic!(
276                        "unity: virtual slot {}
277 out of range (vtable len {}
278) on the runtime class behind {}
279 (method `{}
280`)",
281                        19usize,
282                        __vt.len(),
283                        <ArrayMemberDescriptor as ::unity::ClassIdentity>::NAME,
284                        "PrepareForWiring",
285                    )
286                });
287                let __inner: extern "C" fn(ArrayMemberDescriptor, crate::moon_sharp::interpreter::table::Table, ::unity::OptionalMethod) -> () =
288                    ::core::mem::transmute(__vi.method_ptr);
289                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
290                __inner(__receiver, ::core::convert::Into::into(t), __mi)
291            }
292        }
293    }
294}
295
296#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor")]
297impl<__T: IArrayMemberDescriptor> IArrayMemberDescriptorMethods for __T {}
298
299#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor")]
300impl ArrayMemberDescriptor {
301    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
302        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
303    }
304
305    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
306        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
307    }
308
309    pub fn prepare_for_wiring_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
311    }
312
313    pub fn build_array_indices_method_info() -> &'static ::unity::il2cpp::MethodInfo {
314        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
315    }
316
317    pub fn array_indexer_set_method_info() -> &'static ::unity::il2cpp::MethodInfo {
318        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
319    }
320
321    pub fn array_indexer_get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
322        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
323    }
324}
325
326#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor")]
327impl ArrayMemberDescriptor {
328    #[doc = "Direct (non-virtual) call to `ArrayMemberDescriptor`'s own `PrepareForWiring`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
329    pub unsafe fn prepare_for_wiring(this: impl ::core::convert::Into<::unity::IlInstance>, t: crate::moon_sharp::interpreter::table::Table) -> () {
330        let __mi = Self::prepare_for_wiring_method_info();
331        let __inner: extern "C" fn(::unity::IlInstance, crate::moon_sharp::interpreter::table::Table, ::unity::OptionalMethod) -> () =
332            ::core::mem::transmute(__mi.method_ptr);
333        __inner(this.into(), t, ::core::option::Option::None)
334    }
335}
336
337#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor")]
338impl ArrayMemberDescriptor {
339    #[doc = "`.ctor(::unity::Il2CppString, bool, ::unity::Array<crate::moon_sharp::interpreter::interop::basic_descriptors::parameterdescriptor::ParameterDescriptor>)` — overload selector"]
340    pub fn new(
341        name: ::unity::Il2CppString,
342        is_setter: bool,
343        indexer_params: ::unity::Array<crate::moon_sharp::interpreter::interop::basic_descriptors::parameterdescriptor::ParameterDescriptor>,
344    ) -> Self {
345        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
346            panic!(
347                "{}
348::{}
349 failed to instantiate",
350                ::core::stringify!(ArrayMemberDescriptor),
351                ::core::stringify!(new),
352            )
353        });
354        <Self as IArrayMemberDescriptorMethods>::ctor(this, name, is_setter, indexer_params);
355        this
356    }
357
358    #[doc = "`.ctor(::unity::Il2CppString, bool)` — overload selector"]
359    pub fn new_2(name: ::unity::Il2CppString, is_setter: bool) -> Self {
360        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
361            panic!(
362                "{}
363::{}
364 failed to instantiate",
365                ::core::stringify!(ArrayMemberDescriptor),
366                ::core::stringify!(new_2),
367            )
368        });
369        <Self as IArrayMemberDescriptorMethods>::ctor_2(this, name, is_setter);
370        this
371    }
372}
373
374#[cfg(feature = "moon_sharp-interpreter-interop-arraymemberdescriptor")]
375#[doc(hidden)]
376pub mod prelude {
377    pub use super::{ArrayMemberDescriptor, IArrayMemberDescriptor, IArrayMemberDescriptorMethods};
378    #[cfg(feature = "moon_sharp-interpreter-interop-functionmemberdescriptorbase")]
379    pub use crate::moon_sharp::interpreter::interop::functionmemberdescriptorbase::IFunctionMemberDescriptorBaseMethods;
380    #[cfg(feature = "moon_sharp-interpreter-interop-objectcallbackmemberdescriptor")]
381    pub use crate::moon_sharp::interpreter::interop::objectcallbackmemberdescriptor::IObjectCallbackMemberDescriptorMethods;
382    #[cfg(feature = "system-object")]
383    pub use crate::system::object::IObjectMethods;
384    pub use crate::{
385        moon_sharp::interpreter::interop::{
386            functionmemberdescriptorbase::IFunctionMemberDescriptorBase, objectcallbackmemberdescriptor::IObjectCallbackMemberDescriptor,
387        },
388        system::object::IObject,
389    };
390}