Skip to main content

engage/generated/moon_sharp/interpreter/diagnostics/
performancestatistics.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-diagnostics-performancestatistics-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/diagnostics/performancestatistics/PerformanceStatistics.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter.Diagnostics", name = "PerformanceStatistics")]
12    #[parent(crate::system::object::Object)]
13    pub struct PerformanceStatistics {
14        #[offset(16)]
15        #[rename(name = "m_Stopwatches")]
16        pub m_stopwatches: ::unity::Array<
17            crate::moon_sharp::interpreter::diagnostics::performance_counters::iperformancestopwatch_interface::IPerformanceStopwatch_Interface,
18        >,
19        #[static_field]
20        #[rename(name = "m_GlobalStopwatches")]
21        pub m_global_stopwatches: ::unity::Array<
22            crate::moon_sharp::interpreter::diagnostics::performance_counters::iperformancestopwatch_interface::IPerformanceStopwatch_Interface,
23        >,
24        #[offset(24)]
25        #[rename(name = "m_Enabled")]
26        pub m_enabled: bool,
27    }
28}
29
30#[cfg(feature = "moon_sharp-interpreter-diagnostics-performancestatistics-types")]
31pub use __types::*;
32
33#[cfg(feature = "moon_sharp-interpreter-diagnostics-performancestatistics")]
34#[doc(hidden)]
35#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
36mod __PerformanceStatistics_unity_raw {
37    use super::*;
38    #[doc(hidden)]
39    #[allow(non_snake_case)]
40    pub mod __lookup_get_enabled {
41        use super::*;
42        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
43            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
44            ::unity::lookup::method_info_on_class_with_signature(
45                <PerformanceStatistics as ::unity::ClassIdentity>::class(),
46                "get_Enabled",
47                0,
48                param_types,
49                false,
50            )
51        });
52        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
53            match &*METHOD {
54                ::core::result::Result::Ok(mi) => *mi,
55                ::core::result::Result::Err(e) => {
56                    panic!(
57                        "method lookup failed: {}
58::{}
59: {}
60",
61                        <PerformanceStatistics as ::unity::ClassIdentity>::NAME,
62                        "get_Enabled",
63                        e
64                    )
65                },
66            }
67        }
68    }
69    #[doc(hidden)]
70    #[allow(non_snake_case)]
71    pub mod __lookup_set_enabled {
72        use super::*;
73        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
74            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<bool as ::unity::IlType>::il_type()];
75            ::unity::lookup::method_info_on_class_with_signature(
76                <PerformanceStatistics as ::unity::ClassIdentity>::class(),
77                "set_Enabled",
78                1,
79                param_types,
80                false,
81            )
82        });
83        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
84            match &*METHOD {
85                ::core::result::Result::Ok(mi) => *mi,
86                ::core::result::Result::Err(e) => {
87                    panic!(
88                        "method lookup failed: {}
89::{}
90: {}
91",
92                        <PerformanceStatistics as ::unity::ClassIdentity>::NAME,
93                        "set_Enabled",
94                        e
95                    )
96                },
97            }
98        }
99    }
100    #[doc(hidden)]
101    #[allow(non_snake_case)]
102    pub mod __lookup_get_performance_counter_result {
103        use super::*;
104        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
105            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
106                &[<crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter as ::unity::IlType>::il_type()];
107            ::unity::lookup::method_info_on_class_with_signature(
108                <PerformanceStatistics as ::unity::ClassIdentity>::class(),
109                "GetPerformanceCounterResult",
110                1,
111                param_types,
112                false,
113            )
114        });
115        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
116            match &*METHOD {
117                ::core::result::Result::Ok(mi) => *mi,
118                ::core::result::Result::Err(e) => {
119                    panic!(
120                        "method lookup failed: {}
121::{}
122: {}
123",
124                        <PerformanceStatistics as ::unity::ClassIdentity>::NAME,
125                        "GetPerformanceCounterResult",
126                        e
127                    )
128                },
129            }
130        }
131    }
132    #[doc(hidden)]
133    #[allow(non_snake_case)]
134    pub mod __lookup_get_performance_log {
135        use super::*;
136        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
137            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
138            ::unity::lookup::method_info_on_class_with_signature(
139                <PerformanceStatistics as ::unity::ClassIdentity>::class(),
140                "GetPerformanceLog",
141                0,
142                param_types,
143                false,
144            )
145        });
146        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
147            match &*METHOD {
148                ::core::result::Result::Ok(mi) => *mi,
149                ::core::result::Result::Err(e) => {
150                    panic!(
151                        "method lookup failed: {}
152::{}
153: {}
154",
155                        <PerformanceStatistics as ::unity::ClassIdentity>::NAME,
156                        "GetPerformanceLog",
157                        e
158                    )
159                },
160            }
161        }
162    }
163    #[doc(hidden)]
164    #[allow(non_snake_case)]
165    pub mod __lookup_ctor {
166        use super::*;
167        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
168            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
169            ::unity::lookup::method_info_on_class_with_signature(
170                <PerformanceStatistics as ::unity::ClassIdentity>::class(),
171                ".ctor",
172                0,
173                param_types,
174                false,
175            )
176        });
177        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
178            match &*METHOD {
179                ::core::result::Result::Ok(mi) => *mi,
180                ::core::result::Result::Err(e) => {
181                    panic!(
182                        "method lookup failed: {}
183::{}
184: {}
185",
186                        <PerformanceStatistics as ::unity::ClassIdentity>::NAME,
187                        ".ctor",
188                        e
189                    )
190                },
191            }
192        }
193    }
194    #[doc(hidden)]
195    #[allow(non_snake_case)]
196    pub mod __lookup_cctor {
197        use super::*;
198        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
199            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
200            ::unity::lookup::method_info_on_class_with_signature(
201                <PerformanceStatistics as ::unity::ClassIdentity>::class(),
202                ".cctor",
203                0,
204                param_types,
205                true,
206            )
207        });
208        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
209            match &*METHOD {
210                ::core::result::Result::Ok(mi) => *mi,
211                ::core::result::Result::Err(e) => {
212                    panic!(
213                        "method lookup failed: {}
214::{}
215: {}
216",
217                        <PerformanceStatistics as ::unity::ClassIdentity>::NAME,
218                        ".cctor",
219                        e
220                    )
221                },
222            }
223        }
224    }
225}
226
227#[cfg(feature = "moon_sharp-interpreter-diagnostics-performancestatistics")]
228impl PerformanceStatistics {
229    #[doc = "`.cctor()` overload"]
230    pub fn cctor() -> () {
231        unsafe {
232            ::unity::il2cpp_call!(__PerformanceStatistics_unity_raw::__lookup_cctor::get_method_info().method_ptr,();
233            )
234        }
235    }
236}
237
238#[cfg(feature = "moon_sharp-interpreter-diagnostics-performancestatistics")]
239pub trait IPerformanceStatisticsMethods: IPerformanceStatistics {
240    #[doc = "`get_Enabled()` overload"]
241    fn get_enabled(self) -> bool {
242        unsafe {
243            let __receiver = <PerformanceStatistics as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
244            ::unity::il2cpp_call!(__PerformanceStatistics_unity_raw::__lookup_get_enabled::get_method_info().method_ptr,bool;
245(PerformanceStatistics)__receiver)
246        }
247    }
248    #[doc = "`set_Enabled(bool)` overload"]
249    fn set_enabled(self, value: impl ::core::convert::Into<bool>) -> () {
250        unsafe {
251            let __receiver = <PerformanceStatistics as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
252            ::unity::il2cpp_call!(__PerformanceStatistics_unity_raw::__lookup_set_enabled::get_method_info().method_ptr,();
253(PerformanceStatistics)__receiver,(bool)::core::convert::Into::into(value))
254        }
255    }
256    #[doc = "`GetPerformanceCounterResult(crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter)` overload"]
257    fn get_performance_counter_result(
258        self,
259        pc: impl ::core::convert::Into<crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter>,
260    ) -> crate::moon_sharp::interpreter::diagnostics::performanceresult::PerformanceResult {
261        unsafe {
262            let __receiver = <PerformanceStatistics as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
263            ::unity::il2cpp_call!(__PerformanceStatistics_unity_raw::__lookup_get_performance_counter_result::get_method_info().method_ptr,crate::moon_sharp::interpreter::diagnostics::performanceresult::PerformanceResult;
264(PerformanceStatistics)__receiver,(crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter)::core::convert::Into::into(pc))
265        }
266    }
267    #[doc = "`GetPerformanceLog()` overload"]
268    fn get_performance_log(self) -> ::unity::Il2CppString {
269        unsafe {
270            let __receiver = <PerformanceStatistics as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
271            ::unity::il2cpp_call!(__PerformanceStatistics_unity_raw::__lookup_get_performance_log::get_method_info().method_ptr, ::unity::Il2CppString;
272(PerformanceStatistics)__receiver)
273        }
274    }
275    #[doc = "`.ctor()` overload"]
276    fn ctor(self) -> () {
277        unsafe {
278            let __receiver = <PerformanceStatistics as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
279            ::unity::il2cpp_call!(__PerformanceStatistics_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
280(PerformanceStatistics)__receiver)
281        }
282    }
283}
284
285#[cfg(feature = "moon_sharp-interpreter-diagnostics-performancestatistics")]
286impl<__T: IPerformanceStatistics> IPerformanceStatisticsMethods for __T {}
287
288#[cfg(feature = "moon_sharp-interpreter-diagnostics-performancestatistics")]
289impl PerformanceStatistics {
290    pub fn get_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
291        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
292    }
293
294    pub fn set_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
295        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
296    }
297
298    pub fn get_performance_counter_result_method_info() -> &'static ::unity::il2cpp::MethodInfo {
299        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
300    }
301
302    pub fn get_performance_log_method_info() -> &'static ::unity::il2cpp::MethodInfo {
303        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
304    }
305
306    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
307        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
308    }
309
310    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
311        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
312    }
313}
314
315#[cfg(feature = "moon_sharp-interpreter-diagnostics-performancestatistics")]
316impl PerformanceStatistics {
317    #[doc = "`.ctor()` — no args"]
318    pub fn new() -> Self {
319        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
320            panic!(
321                "{}
322::{}
323 failed to instantiate",
324                ::core::stringify!(PerformanceStatistics),
325                ::core::stringify!(new),
326            )
327        });
328        <Self as IPerformanceStatisticsMethods>::ctor(this);
329        this
330    }
331}
332
333#[cfg(feature = "moon_sharp-interpreter-diagnostics-performancestatistics")]
334#[doc(hidden)]
335pub mod prelude {
336    pub use super::{IPerformanceStatistics, IPerformanceStatisticsMethods, PerformanceStatistics};
337    pub use crate::system::object::IObject;
338    #[cfg(feature = "system-object")]
339    pub use crate::system::object::IObjectMethods;
340}