Skip to main content

engage/generated/moon_sharp/interpreter/interop/converters/
clrtoscriptconversions.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-interop-converters-clrtoscriptconversions-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/converters/clrtoscriptconversions/ClrToScriptConversions.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter.Interop.Converters", name = "ClrToScriptConversions")]
12    #[parent(crate::system::object::Object)]
13    pub struct ClrToScriptConversions {}
14}
15
16#[cfg(feature = "moon_sharp-interpreter-interop-converters-clrtoscriptconversions-types")]
17pub use __types::*;
18
19#[cfg(feature = "moon_sharp-interpreter-interop-converters-clrtoscriptconversions")]
20#[doc(hidden)]
21#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
22mod __ClrToScriptConversions_unity_raw {
23    use super::*;
24    #[doc(hidden)]
25    #[allow(non_snake_case)]
26    pub mod __lookup_try_object_to_trivial_dyn_value {
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::script::Script as ::unity::IlType>::il_type(),
31                <crate::system::object::Object as ::unity::IlType>::il_type(),
32            ];
33            ::unity::lookup::method_info_on_class_with_signature(
34                <ClrToScriptConversions as ::unity::ClassIdentity>::class(),
35                "TryObjectToTrivialDynValue",
36                2,
37                param_types,
38                true,
39            )
40        });
41        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
42            match &*METHOD {
43                ::core::result::Result::Ok(mi) => *mi,
44                ::core::result::Result::Err(e) => {
45                    panic!(
46                        "method lookup failed: {}
47::{}
48: {}
49",
50                        <ClrToScriptConversions as ::unity::ClassIdentity>::NAME,
51                        "TryObjectToTrivialDynValue",
52                        e
53                    )
54                },
55            }
56        }
57    }
58    #[doc(hidden)]
59    #[allow(non_snake_case)]
60    pub mod __lookup_try_object_to_simple_dyn_value {
61        use super::*;
62        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
63            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
64                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
65                <crate::system::object::Object as ::unity::IlType>::il_type(),
66            ];
67            ::unity::lookup::method_info_on_class_with_signature(
68                <ClrToScriptConversions as ::unity::ClassIdentity>::class(),
69                "TryObjectToSimpleDynValue",
70                2,
71                param_types,
72                true,
73            )
74        });
75        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
76            match &*METHOD {
77                ::core::result::Result::Ok(mi) => *mi,
78                ::core::result::Result::Err(e) => {
79                    panic!(
80                        "method lookup failed: {}
81::{}
82: {}
83",
84                        <ClrToScriptConversions as ::unity::ClassIdentity>::NAME,
85                        "TryObjectToSimpleDynValue",
86                        e
87                    )
88                },
89            }
90        }
91    }
92    #[doc(hidden)]
93    #[allow(non_snake_case)]
94    pub mod __lookup_object_to_dyn_value {
95        use super::*;
96        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
97            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
98                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
99                <crate::system::object::Object as ::unity::IlType>::il_type(),
100            ];
101            ::unity::lookup::method_info_on_class_with_signature(
102                <ClrToScriptConversions as ::unity::ClassIdentity>::class(),
103                "ObjectToDynValue",
104                2,
105                param_types,
106                true,
107            )
108        });
109        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
110            match &*METHOD {
111                ::core::result::Result::Ok(mi) => *mi,
112                ::core::result::Result::Err(e) => {
113                    panic!(
114                        "method lookup failed: {}
115::{}
116: {}
117",
118                        <ClrToScriptConversions as ::unity::ClassIdentity>::NAME,
119                        "ObjectToDynValue",
120                        e
121                    )
122                },
123            }
124        }
125    }
126    #[doc(hidden)]
127    #[allow(non_snake_case)]
128    pub mod __lookup_enumeration_to_dyn_value {
129        use super::*;
130        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
131            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
132                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
133                <crate::system::object::Object as ::unity::IlType>::il_type(),
134            ];
135            ::unity::lookup::method_info_on_class_with_signature(
136                <ClrToScriptConversions as ::unity::ClassIdentity>::class(),
137                "EnumerationToDynValue",
138                2,
139                param_types,
140                true,
141            )
142        });
143        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
144            match &*METHOD {
145                ::core::result::Result::Ok(mi) => *mi,
146                ::core::result::Result::Err(e) => {
147                    panic!(
148                        "method lookup failed: {}
149::{}
150: {}
151",
152                        <ClrToScriptConversions as ::unity::ClassIdentity>::NAME,
153                        "EnumerationToDynValue",
154                        e
155                    )
156                },
157            }
158        }
159    }
160}
161
162#[cfg(feature = "moon_sharp-interpreter-interop-converters-clrtoscriptconversions")]
163impl ClrToScriptConversions {
164    #[doc = "`TryObjectToTrivialDynValue(crate::moon_sharp::interpreter::script::Script, crate::system::object::Object)` overload"]
165    pub fn try_object_to_trivial_dyn_value(
166        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
167        obj: impl ::core::convert::Into<crate::system::object::Object>,
168    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
169        unsafe {
170            ::unity::il2cpp_call!(__ClrToScriptConversions_unity_raw::__lookup_try_object_to_trivial_dyn_value::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
171(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(crate::system::object::Object)::core::convert::Into::into(obj))
172        }
173    }
174
175    #[doc = "`TryObjectToSimpleDynValue(crate::moon_sharp::interpreter::script::Script, crate::system::object::Object)` overload"]
176    pub fn try_object_to_simple_dyn_value(
177        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
178        obj: impl ::core::convert::Into<crate::system::object::Object>,
179    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
180        unsafe {
181            ::unity::il2cpp_call!(__ClrToScriptConversions_unity_raw::__lookup_try_object_to_simple_dyn_value::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
182(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(crate::system::object::Object)::core::convert::Into::into(obj))
183        }
184    }
185
186    #[doc = "`ObjectToDynValue(crate::moon_sharp::interpreter::script::Script, crate::system::object::Object)` overload"]
187    pub fn object_to_dyn_value(
188        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
189        obj: impl ::core::convert::Into<crate::system::object::Object>,
190    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
191        unsafe {
192            ::unity::il2cpp_call!(__ClrToScriptConversions_unity_raw::__lookup_object_to_dyn_value::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
193(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(crate::system::object::Object)::core::convert::Into::into(obj))
194        }
195    }
196
197    #[doc = "`EnumerationToDynValue(crate::moon_sharp::interpreter::script::Script, crate::system::object::Object)` overload"]
198    pub fn enumeration_to_dyn_value(
199        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
200        obj: impl ::core::convert::Into<crate::system::object::Object>,
201    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
202        unsafe {
203            ::unity::il2cpp_call!(__ClrToScriptConversions_unity_raw::__lookup_enumeration_to_dyn_value::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
204(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(crate::system::object::Object)::core::convert::Into::into(obj))
205        }
206    }
207}
208
209#[cfg(feature = "moon_sharp-interpreter-interop-converters-clrtoscriptconversions")]
210impl ClrToScriptConversions {
211    pub fn try_object_to_trivial_dyn_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
213    }
214
215    pub fn try_object_to_simple_dyn_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
216        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
217    }
218
219    pub fn object_to_dyn_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
220        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
221    }
222
223    pub fn enumeration_to_dyn_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
224        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
225    }
226}
227
228#[cfg(feature = "moon_sharp-interpreter-interop-converters-clrtoscriptconversions")]
229#[doc(hidden)]
230pub mod prelude {
231    pub use super::{ClrToScriptConversions, IClrToScriptConversions};
232    pub use crate::system::object::IObject;
233    #[cfg(feature = "system-object")]
234    pub use crate::system::object::IObjectMethods;
235}