Skip to main content

engage/generated/moon_sharp/interpreter/core_lib/
coroutinemodule.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-core_lib-coroutinemodule-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/moon_sharp/interpreter/core_lib/coroutinemodule/CoroutineModule.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter.CoreLib", name = "CoroutineModule")]
12    #[parent(crate::system::object::Object)]
13    pub struct CoroutineModule {}
14}
15
16#[cfg(feature = "moon_sharp-interpreter-core_lib-coroutinemodule-types")]
17pub use __types::*;
18
19#[cfg(feature = "moon_sharp-interpreter-core_lib-coroutinemodule")]
20#[doc(hidden)]
21#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
22mod __CoroutineModule_unity_raw {
23    use super::*;
24    #[doc(hidden)]
25    #[allow(non_snake_case)]
26    pub mod __lookup_create {
27        use super::*;
28        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
29            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
30                <crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type(),
31                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
32            ];
33            ::unity::lookup::method_info_on_class_with_signature(<CoroutineModule as ::unity::ClassIdentity>::class(), "create", 2, param_types, true)
34        });
35        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
36            match &*METHOD {
37                ::core::result::Result::Ok(mi) => *mi,
38                ::core::result::Result::Err(e) => {
39                    panic!(
40                        "method lookup failed: {}
41::{}
42: {}
43",
44                        <CoroutineModule as ::unity::ClassIdentity>::NAME,
45                        "create",
46                        e
47                    )
48                },
49            }
50        }
51    }
52    #[doc(hidden)]
53    #[allow(non_snake_case)]
54    pub mod __lookup_wrap {
55        use super::*;
56        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
57            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
58                <crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type(),
59                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
60            ];
61            ::unity::lookup::method_info_on_class_with_signature(<CoroutineModule as ::unity::ClassIdentity>::class(), "wrap", 2, param_types, true)
62        });
63        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
64            match &*METHOD {
65                ::core::result::Result::Ok(mi) => *mi,
66                ::core::result::Result::Err(e) => {
67                    panic!(
68                        "method lookup failed: {}
69::{}
70: {}
71",
72                        <CoroutineModule as ::unity::ClassIdentity>::NAME,
73                        "wrap",
74                        e
75                    )
76                },
77            }
78        }
79    }
80    #[doc(hidden)]
81    #[allow(non_snake_case)]
82    pub mod __lookup_wrap_wrapper {
83        use super::*;
84        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
85            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
86                <crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type(),
87                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
88            ];
89            ::unity::lookup::method_info_on_class_with_signature(
90                <CoroutineModule as ::unity::ClassIdentity>::class(),
91                "__wrap_wrapper",
92                2,
93                param_types,
94                true,
95            )
96        });
97        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
98            match &*METHOD {
99                ::core::result::Result::Ok(mi) => *mi,
100                ::core::result::Result::Err(e) => {
101                    panic!(
102                        "method lookup failed: {}
103::{}
104: {}
105",
106                        <CoroutineModule as ::unity::ClassIdentity>::NAME,
107                        "__wrap_wrapper",
108                        e
109                    )
110                },
111            }
112        }
113    }
114    #[doc(hidden)]
115    #[allow(non_snake_case)]
116    pub mod __lookup_resume {
117        use super::*;
118        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
119            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
120                <crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type(),
121                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
122            ];
123            ::unity::lookup::method_info_on_class_with_signature(<CoroutineModule as ::unity::ClassIdentity>::class(), "resume", 2, param_types, true)
124        });
125        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
126            match &*METHOD {
127                ::core::result::Result::Ok(mi) => *mi,
128                ::core::result::Result::Err(e) => {
129                    panic!(
130                        "method lookup failed: {}
131::{}
132: {}
133",
134                        <CoroutineModule as ::unity::ClassIdentity>::NAME,
135                        "resume",
136                        e
137                    )
138                },
139            }
140        }
141    }
142    #[doc(hidden)]
143    #[allow(non_snake_case)]
144    pub mod __lookup_yield {
145        use super::*;
146        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
147            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
148                <crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type(),
149                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
150            ];
151            ::unity::lookup::method_info_on_class_with_signature(<CoroutineModule as ::unity::ClassIdentity>::class(), "yield", 2, param_types, true)
152        });
153        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
154            match &*METHOD {
155                ::core::result::Result::Ok(mi) => *mi,
156                ::core::result::Result::Err(e) => {
157                    panic!(
158                        "method lookup failed: {}
159::{}
160: {}
161",
162                        <CoroutineModule as ::unity::ClassIdentity>::NAME,
163                        "yield",
164                        e
165                    )
166                },
167            }
168        }
169    }
170    #[doc(hidden)]
171    #[allow(non_snake_case)]
172    pub mod __lookup_running {
173        use super::*;
174        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
175            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
176                <crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type(),
177                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
178            ];
179            ::unity::lookup::method_info_on_class_with_signature(
180                <CoroutineModule as ::unity::ClassIdentity>::class(),
181                "running",
182                2,
183                param_types,
184                true,
185            )
186        });
187        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
188            match &*METHOD {
189                ::core::result::Result::Ok(mi) => *mi,
190                ::core::result::Result::Err(e) => {
191                    panic!(
192                        "method lookup failed: {}
193::{}
194: {}
195",
196                        <CoroutineModule as ::unity::ClassIdentity>::NAME,
197                        "running",
198                        e
199                    )
200                },
201            }
202        }
203    }
204    #[doc(hidden)]
205    #[allow(non_snake_case)]
206    pub mod __lookup_status {
207        use super::*;
208        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
209            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
210                <crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type(),
211                <crate::moon_sharp::interpreter::callbackarguments::CallbackArguments as ::unity::IlType>::il_type(),
212            ];
213            ::unity::lookup::method_info_on_class_with_signature(<CoroutineModule as ::unity::ClassIdentity>::class(), "status", 2, param_types, true)
214        });
215        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
216            match &*METHOD {
217                ::core::result::Result::Ok(mi) => *mi,
218                ::core::result::Result::Err(e) => {
219                    panic!(
220                        "method lookup failed: {}
221::{}
222: {}
223",
224                        <CoroutineModule as ::unity::ClassIdentity>::NAME,
225                        "status",
226                        e
227                    )
228                },
229            }
230        }
231    }
232    #[doc(hidden)]
233    #[allow(non_snake_case)]
234    pub mod __lookup_ctor {
235        use super::*;
236        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
237            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
238            ::unity::lookup::method_info_on_class_with_signature(<CoroutineModule as ::unity::ClassIdentity>::class(), ".ctor", 0, param_types, false)
239        });
240        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
241            match &*METHOD {
242                ::core::result::Result::Ok(mi) => *mi,
243                ::core::result::Result::Err(e) => {
244                    panic!(
245                        "method lookup failed: {}
246::{}
247: {}
248",
249                        <CoroutineModule as ::unity::ClassIdentity>::NAME,
250                        ".ctor",
251                        e
252                    )
253                },
254            }
255        }
256    }
257}
258
259#[cfg(feature = "moon_sharp-interpreter-core_lib-coroutinemodule")]
260impl CoroutineModule {
261    #[doc = "`create(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)` overload"]
262    pub fn create(
263        execution_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
264        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
265    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
266        unsafe {
267            ::unity::il2cpp_call!(__CoroutineModule_unity_raw::__lookup_create::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
268(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(execution_context),(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args))
269        }
270    }
271
272    #[doc = "`wrap(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)` overload"]
273    pub fn wrap(
274        execution_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
275        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
276    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
277        unsafe {
278            ::unity::il2cpp_call!(__CoroutineModule_unity_raw::__lookup_wrap::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
279(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(execution_context),(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args))
280        }
281    }
282
283    #[doc = "`__wrap_wrapper(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)` overload"]
284    pub fn wrap_wrapper(
285        execution_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
286        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
287    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
288        unsafe {
289            ::unity::il2cpp_call!(__CoroutineModule_unity_raw::__lookup_wrap_wrapper::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
290(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(execution_context),(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args))
291        }
292    }
293
294    #[doc = "`resume(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)` overload"]
295    pub fn resume(
296        execution_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
297        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
298    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
299        unsafe {
300            ::unity::il2cpp_call!(__CoroutineModule_unity_raw::__lookup_resume::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
301(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(execution_context),(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args))
302        }
303    }
304
305    #[doc = "`yield(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)` overload"]
306    pub fn r#yield(
307        execution_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
308        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
309    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
310        unsafe {
311            ::unity::il2cpp_call!(__CoroutineModule_unity_raw::__lookup_yield::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
312(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(execution_context),(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args))
313        }
314    }
315
316    #[doc = "`running(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)` overload"]
317    pub fn running(
318        execution_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
319        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
320    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
321        unsafe {
322            ::unity::il2cpp_call!(__CoroutineModule_unity_raw::__lookup_running::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
323(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(execution_context),(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args))
324        }
325    }
326
327    #[doc = "`status(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)` overload"]
328    pub fn status(
329        execution_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
330        args: impl ::core::convert::Into<crate::moon_sharp::interpreter::callbackarguments::CallbackArguments>,
331    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
332        unsafe {
333            ::unity::il2cpp_call!(__CoroutineModule_unity_raw::__lookup_status::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
334(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(execution_context),(crate::moon_sharp::interpreter::callbackarguments::CallbackArguments)::core::convert::Into::into(args))
335        }
336    }
337}
338
339#[cfg(feature = "moon_sharp-interpreter-core_lib-coroutinemodule")]
340pub trait ICoroutineModuleMethods: ICoroutineModule {
341    #[doc = "`.ctor()` overload"]
342    fn ctor(self) -> () {
343        unsafe {
344            let __receiver = <CoroutineModule as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
345            ::unity::il2cpp_call!(__CoroutineModule_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
346(CoroutineModule)__receiver)
347        }
348    }
349}
350
351#[cfg(feature = "moon_sharp-interpreter-core_lib-coroutinemodule")]
352impl<__T: ICoroutineModule> ICoroutineModuleMethods for __T {}
353
354#[cfg(feature = "moon_sharp-interpreter-core_lib-coroutinemodule")]
355impl CoroutineModule {
356    pub fn create_method_info() -> &'static ::unity::il2cpp::MethodInfo {
357        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
358    }
359
360    pub fn wrap_method_info() -> &'static ::unity::il2cpp::MethodInfo {
361        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
362    }
363
364    pub fn wrap_wrapper_method_info() -> &'static ::unity::il2cpp::MethodInfo {
365        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
366    }
367
368    pub fn resume_method_info() -> &'static ::unity::il2cpp::MethodInfo {
369        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
370    }
371
372    pub fn yield_method_info() -> &'static ::unity::il2cpp::MethodInfo {
373        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
374    }
375
376    pub fn running_method_info() -> &'static ::unity::il2cpp::MethodInfo {
377        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
378    }
379
380    pub fn status_method_info() -> &'static ::unity::il2cpp::MethodInfo {
381        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
382    }
383
384    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
385        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
386    }
387}
388
389#[cfg(feature = "moon_sharp-interpreter-core_lib-coroutinemodule")]
390impl CoroutineModule {
391    #[doc = "`.ctor()` — no args"]
392    pub fn new() -> Self {
393        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
394            panic!(
395                "{}
396::{}
397 failed to instantiate",
398                ::core::stringify!(CoroutineModule),
399                ::core::stringify!(new),
400            )
401        });
402        <Self as ICoroutineModuleMethods>::ctor(this);
403        this
404    }
405}
406
407#[cfg(feature = "moon_sharp-interpreter-core_lib-coroutinemodule")]
408#[doc(hidden)]
409pub mod prelude {
410    pub use super::{CoroutineModule, ICoroutineModule, ICoroutineModuleMethods};
411    pub use crate::system::object::IObject;
412    #[cfg(feature = "system-object")]
413    pub use crate::system::object::IObjectMethods;
414}