Skip to main content

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

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-interop-anonwrapper-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/interop/anonwrapper/AnonWrapper.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter.Interop", name = "AnonWrapper")]
12    #[parent(crate::system::object::Object)]
13    pub struct AnonWrapper {}
14}
15
16#[cfg(feature = "moon_sharp-interpreter-interop-anonwrapper-types")]
17pub use __types::*;
18
19#[cfg(feature = "moon_sharp-interpreter-interop-anonwrapper")]
20#[doc(hidden)]
21#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
22mod __AnonWrapper_unity_raw {
23    use super::*;
24    #[doc(hidden)]
25    #[allow(non_snake_case)]
26    pub mod __lookup_ctor {
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            ::unity::lookup::method_info_on_class_with_signature(<AnonWrapper as ::unity::ClassIdentity>::class(), ".ctor", 0, param_types, false)
31        });
32        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
33            match &*METHOD {
34                ::core::result::Result::Ok(mi) => *mi,
35                ::core::result::Result::Err(e) => {
36                    panic!(
37                        "method lookup failed: {}
38::{}
39: {}
40",
41                        <AnonWrapper as ::unity::ClassIdentity>::NAME,
42                        ".ctor",
43                        e
44                    )
45                },
46            }
47        }
48    }
49}
50
51#[cfg(feature = "moon_sharp-interpreter-interop-anonwrapper")]
52pub trait IAnonWrapperMethods: IAnonWrapper {
53    #[doc = "`.ctor()` overload"]
54    fn ctor(self) -> () {
55        unsafe {
56            let __receiver = <AnonWrapper as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
57            ::unity::il2cpp_call!(__AnonWrapper_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
58(AnonWrapper)__receiver)
59        }
60    }
61}
62
63#[cfg(feature = "moon_sharp-interpreter-interop-anonwrapper")]
64impl<__T: IAnonWrapper> IAnonWrapperMethods for __T {}
65
66#[cfg(feature = "moon_sharp-interpreter-interop-anonwrapper")]
67impl AnonWrapper {
68    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
69        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
70    }
71}
72
73#[cfg(feature = "moon_sharp-interpreter-interop-anonwrapper")]
74impl AnonWrapper {
75    #[doc = "`.ctor()` — no args"]
76    pub fn new() -> Self {
77        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
78            panic!(
79                "{}
80::{}
81 failed to instantiate",
82                ::core::stringify!(AnonWrapper),
83                ::core::stringify!(new),
84            )
85        });
86        <Self as IAnonWrapperMethods>::ctor(this);
87        this
88    }
89}
90
91#[cfg(feature = "moon_sharp-interpreter-interop-anonwrapper")]
92#[doc(hidden)]
93pub mod prelude {
94    pub use super::{AnonWrapper, IAnonWrapper, IAnonWrapperMethods};
95    pub use crate::system::object::IObject;
96    #[cfg(feature = "system-object")]
97    pub use crate::system::object::IObjectMethods;
98}