Skip to main content

engage/generated/moon_sharp/interpreter/
luatypeextensions.rs

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