engage/generated/moon_sharp/interpreter/diagnostics/performance_counters/
globalperformancestopwatch.rs1#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch-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/performance_counters/globalperformancestopwatch/GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject.md"))]
11 #[::unity::class(
12 namespace = "MoonSharp.Interpreter.Diagnostics.PerformanceCounters",
13 name = "GlobalPerformanceStopwatch.GlobalPerformanceStopwatch_StopwatchObject"
14 )]
15 #[parent(crate::system::object::Object)]
16 pub struct GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject {
17 #[offset(24)]
18 #[rename(name = "m_Parent")]
19 pub m_parent: crate::moon_sharp::interpreter::diagnostics::performance_counters::globalperformancestopwatch::GlobalPerformanceStopwatch,
20 }
21
22 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/diagnostics/performance_counters/globalperformancestopwatch/GlobalPerformanceStopwatch.md"))]
23 #[::unity::class(namespace = "MoonSharp.Interpreter.Diagnostics.PerformanceCounters", name = "GlobalPerformanceStopwatch")]
24 #[parent(crate::system::object::Object)]
25 pub struct GlobalPerformanceStopwatch {
26 #[offset(16)]
27 #[rename(name = "m_Count")]
28 pub m_count: i32,
29 #[offset(24)]
30 #[rename(name = "m_Elapsed")]
31 pub m_elapsed: i64,
32 #[offset(32)]
33 #[rename(name = "m_Counter")]
34 pub m_counter: crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter,
35 }
36}
37
38#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch-types")]
39pub use __types::*;
40
41#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
42#[doc(hidden)]
43#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
44mod __GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject_unity_raw {
45 use super::*;
46 #[doc(hidden)]
47 #[allow(non_snake_case)]
48 pub mod __lookup_ctor {
49 use super::*;
50 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
51 let param_types: &[& 'static::unity::il2cpp::Il2CppType]= &[<crate::moon_sharp::interpreter::diagnostics::performance_counters::globalperformancestopwatch::GlobalPerformanceStopwatch as::unity::IlType> ::il_type()];
52 ::unity::lookup::method_info_on_class_with_signature(
53 <GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject as ::unity::ClassIdentity>::class(),
54 ".ctor",
55 1,
56 param_types,
57 false,
58 )
59 });
60 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
61 match &*METHOD {
62 ::core::result::Result::Ok(mi) => *mi,
63 ::core::result::Result::Err(e) => {
64 panic!(
65 "method lookup failed: {}
66::{}
67: {}
68",
69 <GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject as ::unity::ClassIdentity>::NAME,
70 ".ctor",
71 e
72 )
73 },
74 }
75 }
76 }
77}
78
79#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
80pub trait IGlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObjectMethods:
81 IGlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject
82{
83 #[doc = "`.ctor(crate::moon_sharp::interpreter::diagnostics::performance_counters::globalperformancestopwatch::GlobalPerformanceStopwatch)` overload"]
84 fn ctor(
85 self,
86 parent: impl ::core::convert::Into<
87 crate::moon_sharp::interpreter::diagnostics::performance_counters::globalperformancestopwatch::GlobalPerformanceStopwatch,
88 >,
89 ) -> () {
90 unsafe {
91 let __receiver = <GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject as ::unity::FromIlInstance>::from_il_instance(
92 <Self as ::unity::SystemObject>::as_instance(self),
93 );
94 ::unity::il2cpp_call!(__GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
95(GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject)__receiver,(crate::moon_sharp::interpreter::diagnostics::performance_counters::globalperformancestopwatch::GlobalPerformanceStopwatch)::core::convert::Into::into(parent))
96 }
97 }
98 #[doc = "`Dispose()` overload"]
99 fn dispose(self) -> () {
100 unsafe {
101 let __receiver = <GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject as ::unity::FromIlInstance>::from_il_instance(
102 <Self as ::unity::SystemObject>::as_instance(self),
103 );
104 {
105 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
106 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
107 panic!(
108 "unity: virtual slot {}
109 out of range (vtable len {}
110) on the runtime class behind {}
111 (method `{}
112`)",
113 4usize,
114 __vt.len(),
115 <GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject as ::unity::ClassIdentity>::NAME,
116 "Dispose",
117 )
118 });
119 let __inner: extern "C" fn(GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject, ::unity::OptionalMethod) -> () =
120 ::core::mem::transmute(__vi.method_ptr);
121 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
122 __inner(__receiver, __mi)
123 }
124 }
125 }
126}
127
128#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
129impl<__T: IGlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject>
130 IGlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObjectMethods for __T
131{
132}
133
134#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
135impl GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject {
136 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
137 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
138 }
139
140 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
141 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
142 }
143}
144
145#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
146impl GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject {
147 #[doc = "Direct (non-virtual) call to `GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
148 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
149 let __mi = Self::dispose_method_info();
150 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
151 __inner(this.into(), ::core::option::Option::None)
152 }
153}
154
155#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
156impl GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject {
157 #[doc = "`.ctor(crate::moon_sharp::interpreter::diagnostics::performance_counters::globalperformancestopwatch::GlobalPerformanceStopwatch)` — overload selector"]
158 pub fn new(
159 parent: crate::moon_sharp::interpreter::diagnostics::performance_counters::globalperformancestopwatch::GlobalPerformanceStopwatch,
160 ) -> Self {
161 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
162 panic!(
163 "{}
164::{}
165 failed to instantiate",
166 ::core::stringify!(GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject),
167 ::core::stringify!(new),
168 )
169 });
170 <Self as IGlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObjectMethods>::ctor(this, parent);
171 this
172 }
173}
174
175#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
176#[doc(hidden)]
177#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
178mod __GlobalPerformanceStopwatch_unity_raw {
179 use super::*;
180 #[doc(hidden)]
181 #[allow(non_snake_case)]
182 pub mod __lookup_ctor {
183 use super::*;
184 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
185 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
186 &[<crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter as ::unity::IlType>::il_type()];
187 ::unity::lookup::method_info_on_class_with_signature(
188 <GlobalPerformanceStopwatch as ::unity::ClassIdentity>::class(),
189 ".ctor",
190 1,
191 param_types,
192 false,
193 )
194 });
195 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
196 match &*METHOD {
197 ::core::result::Result::Ok(mi) => *mi,
198 ::core::result::Result::Err(e) => {
199 panic!(
200 "method lookup failed: {}
201::{}
202: {}
203",
204 <GlobalPerformanceStopwatch as ::unity::ClassIdentity>::NAME,
205 ".ctor",
206 e
207 )
208 },
209 }
210 }
211 }
212}
213
214#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
215pub trait IGlobalPerformanceStopwatchMethods: IGlobalPerformanceStopwatch {
216 #[doc = "`.ctor(crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter)` overload"]
217 fn ctor(
218 self,
219 perfcounter: impl ::core::convert::Into<crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter>,
220 ) -> () {
221 unsafe {
222 let __receiver =
223 <GlobalPerformanceStopwatch as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
224 ::unity::il2cpp_call!(__GlobalPerformanceStopwatch_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
225(GlobalPerformanceStopwatch)__receiver,(crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter)::core::convert::Into::into(perfcounter))
226 }
227 }
228 #[doc = "`GetResult()` overload"]
229 fn get_result(self) -> crate::moon_sharp::interpreter::diagnostics::performanceresult::PerformanceResult {
230 unsafe {
231 let __receiver =
232 <GlobalPerformanceStopwatch as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
233 {
234 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
235 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
236 panic!(
237 "unity: virtual slot {}
238 out of range (vtable len {}
239) on the runtime class behind {}
240 (method `{}
241`)",
242 5usize,
243 __vt.len(),
244 <GlobalPerformanceStopwatch as ::unity::ClassIdentity>::NAME,
245 "GetResult",
246 )
247 });
248 let __inner: extern "C" fn(
249 GlobalPerformanceStopwatch,
250 ::unity::OptionalMethod,
251 ) -> crate::moon_sharp::interpreter::diagnostics::performanceresult::PerformanceResult = ::core::mem::transmute(__vi.method_ptr);
252 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
253 __inner(__receiver, __mi)
254 }
255 }
256 }
257}
258
259#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
260impl<__T: IGlobalPerformanceStopwatch> IGlobalPerformanceStopwatchMethods for __T {}
261
262#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
263impl GlobalPerformanceStopwatch {
264 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
265 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
266 }
267
268 pub fn get_result_method_info() -> &'static ::unity::il2cpp::MethodInfo {
269 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
270 }
271}
272
273#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
274impl GlobalPerformanceStopwatch {
275 #[doc = "Direct (non-virtual) call to `GlobalPerformanceStopwatch`'s own `GetResult`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
276 pub unsafe fn get_result(
277 this: impl ::core::convert::Into<::unity::IlInstance>,
278 ) -> crate::moon_sharp::interpreter::diagnostics::performanceresult::PerformanceResult {
279 let __mi = Self::get_result_method_info();
280 let __inner: extern "C" fn(
281 ::unity::IlInstance,
282 ::unity::OptionalMethod,
283 ) -> crate::moon_sharp::interpreter::diagnostics::performanceresult::PerformanceResult = ::core::mem::transmute(__mi.method_ptr);
284 __inner(this.into(), ::core::option::Option::None)
285 }
286}
287
288#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
289impl GlobalPerformanceStopwatch {
290 #[doc = "`.ctor(crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter)` — overload selector"]
291 pub fn new(perfcounter: crate::moon_sharp::interpreter::diagnostics::performancecounter::PerformanceCounter) -> Self {
292 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
293 panic!(
294 "{}
295::{}
296 failed to instantiate",
297 ::core::stringify!(GlobalPerformanceStopwatch),
298 ::core::stringify!(new),
299 )
300 });
301 <Self as IGlobalPerformanceStopwatchMethods>::ctor(this, perfcounter);
302 this
303 }
304}
305
306#[cfg(feature = "moon_sharp-interpreter-diagnostics-performance_counters-globalperformancestopwatch")]
307#[doc(hidden)]
308pub mod prelude {
309 pub use super::{
310 GlobalPerformanceStopwatch, GlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject, IGlobalPerformanceStopwatch,
311 IGlobalPerformanceStopwatchMethods, IGlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObject,
312 IGlobalPerformanceStopwatch_GlobalPerformanceStopwatch_StopwatchObjectMethods,
313 };
314 pub use crate::system::object::IObject;
315 #[cfg(feature = "system-object")]
316 pub use crate::system::object::IObjectMethods;
317}