engage/generated/unity_engine/resource_management/diagnostics/
diagnosticeventcollector.rs1#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollector-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 system::object::{IObject, Object},
10 unity_engine::{
11 behaviour::{Behaviour, IBehaviour},
12 component::{Component, IComponent},
13 monobehaviour::{IMonoBehaviour, MonoBehaviour},
14 object_2::{IObject_2, Object_2},
15 },
16 };
17
18 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/resource_management/diagnostics/diagnosticeventcollector/DiagnosticEventCollector.md"))]
19 #[::unity::class(namespace = "UnityEngine.ResourceManagement.Diagnostics", name = "DiagnosticEventCollector")]
20 #[parent(crate::unity_engine::monobehaviour::MonoBehaviour)]
21 pub struct DiagnosticEventCollector {
22 #[static_field]
23 #[rename(name = "s_Collector")]
24 pub s_collector: crate::unity_engine::resource_management::diagnostics::diagnosticeventcollector::DiagnosticEventCollector,
25 }
26}
27
28#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollector-types")]
29pub use __types::*;
30
31#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollector")]
32#[doc(hidden)]
33#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
34mod __DiagnosticEventCollector_unity_raw {
35 use super::*;
36 #[doc(hidden)]
37 #[allow(non_snake_case)]
38 pub mod __lookup_find_or_create_global_instance {
39 use super::*;
40 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
41 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
42 ::unity::lookup::method_info_on_class_with_signature(
43 <DiagnosticEventCollector as ::unity::ClassIdentity>::class(),
44 "FindOrCreateGlobalInstance",
45 0,
46 param_types,
47 true,
48 )
49 });
50 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
51 match &*METHOD {
52 ::core::result::Result::Ok(mi) => *mi,
53 ::core::result::Result::Err(e) => {
54 panic!(
55 "method lookup failed: {}
56::{}
57: {}
58",
59 <DiagnosticEventCollector as ::unity::ClassIdentity>::NAME,
60 "FindOrCreateGlobalInstance",
61 e
62 )
63 },
64 }
65 }
66 }
67 #[doc(hidden)]
68 #[allow(non_snake_case)]
69 pub mod __lookup_register_event_handler {
70 use super::*;
71 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
72 let param_types: &[& 'static::unity::il2cpp::Il2CppType]= &[<crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>as::unity::IlType> ::il_type(), <bool as::unity::IlType> ::il_type(), <bool as::unity::IlType> ::il_type()];
73 ::unity::lookup::method_info_on_class_with_signature(
74 <DiagnosticEventCollector as ::unity::ClassIdentity>::class(),
75 "RegisterEventHandler",
76 3,
77 param_types,
78 true,
79 )
80 });
81 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
82 match &*METHOD {
83 ::core::result::Result::Ok(mi) => *mi,
84 ::core::result::Result::Err(e) => {
85 panic!(
86 "method lookup failed: {}
87::{}
88: {}
89",
90 <DiagnosticEventCollector as ::unity::ClassIdentity>::NAME,
91 "RegisterEventHandler",
92 e
93 )
94 },
95 }
96 }
97 }
98 #[doc(hidden)]
99 #[allow(non_snake_case)]
100 pub mod __lookup_unregister_event_handler {
101 use super::*;
102 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
103 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<crate::system::action_1::Action_1<
104 crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent,
105 > as ::unity::IlType>::il_type()];
106 ::unity::lookup::method_info_on_class_with_signature(
107 <DiagnosticEventCollector as ::unity::ClassIdentity>::class(),
108 "UnregisterEventHandler",
109 1,
110 param_types,
111 false,
112 )
113 });
114 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
115 match &*METHOD {
116 ::core::result::Result::Ok(mi) => *mi,
117 ::core::result::Result::Err(e) => {
118 panic!(
119 "method lookup failed: {}
120::{}
121: {}
122",
123 <DiagnosticEventCollector as ::unity::ClassIdentity>::NAME,
124 "UnregisterEventHandler",
125 e
126 )
127 },
128 }
129 }
130 }
131 #[doc(hidden)]
132 #[allow(non_snake_case)]
133 pub mod __lookup_post_event {
134 use super::*;
135 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
136 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
137 &[<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent as ::unity::IlType>::il_type()];
138 ::unity::lookup::method_info_on_class_with_signature(
139 <DiagnosticEventCollector as ::unity::ClassIdentity>::class(),
140 "PostEvent",
141 1,
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 <DiagnosticEventCollector as ::unity::ClassIdentity>::NAME,
156 "PostEvent",
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 <DiagnosticEventCollector 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 <DiagnosticEventCollector as ::unity::ClassIdentity>::NAME,
187 ".ctor",
188 e
189 )
190 },
191 }
192 }
193 }
194}
195
196#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollector")]
197impl DiagnosticEventCollector {
198 #[doc = "`FindOrCreateGlobalInstance()` overload"]
199 pub fn find_or_create_global_instance(
200 ) -> crate::unity_engine::resource_management::diagnostics::diagnosticeventcollector::DiagnosticEventCollector {
201 unsafe {
202 ::unity::il2cpp_call!(__DiagnosticEventCollector_unity_raw::__lookup_find_or_create_global_instance::get_method_info().method_ptr,crate::unity_engine::resource_management::diagnostics::diagnosticeventcollector::DiagnosticEventCollector;
203 )
204 }
205 }
206
207 #[doc = "`RegisterEventHandler(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>, bool, bool)` overload"]
208 pub fn register_event_handler(
209 handler: impl ::core::convert::Into<
210 crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>,
211 >,
212 register: impl ::core::convert::Into<bool>,
213 create: impl ::core::convert::Into<bool>,
214 ) -> bool {
215 unsafe {
216 ::unity::il2cpp_call!(__DiagnosticEventCollector_unity_raw::__lookup_register_event_handler::get_method_info().method_ptr,bool;
217(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>)::core::convert::Into::into(handler),(bool)::core::convert::Into::into(register),(bool)::core::convert::Into::into(create))
218 }
219 }
220}
221
222#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollector")]
223pub trait IDiagnosticEventCollectorMethods: IDiagnosticEventCollector {
224 #[doc = "`UnregisterEventHandler(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>)` overload"]
225 fn unregister_event_handler(
226 self,
227 handler: impl ::core::convert::Into<
228 crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>,
229 >,
230 ) -> () {
231 unsafe {
232 let __receiver =
233 <DiagnosticEventCollector as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
234 ::unity::il2cpp_call!(__DiagnosticEventCollector_unity_raw::__lookup_unregister_event_handler::get_method_info().method_ptr,();
235(DiagnosticEventCollector)__receiver,(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>)::core::convert::Into::into(handler))
236 }
237 }
238 #[doc = "`PostEvent(crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent)` overload"]
239 fn post_event(
240 self,
241 diagnostic_event: impl ::core::convert::Into<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>,
242 ) -> () {
243 unsafe {
244 let __receiver =
245 <DiagnosticEventCollector as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
246 ::unity::il2cpp_call!(__DiagnosticEventCollector_unity_raw::__lookup_post_event::get_method_info().method_ptr,();
247(DiagnosticEventCollector)__receiver,(crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent)::core::convert::Into::into(diagnostic_event))
248 }
249 }
250 #[doc = "`.ctor()` overload"]
251 fn ctor(self) -> () {
252 unsafe {
253 let __receiver =
254 <DiagnosticEventCollector as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
255 ::unity::il2cpp_call!(__DiagnosticEventCollector_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
256(DiagnosticEventCollector)__receiver)
257 }
258 }
259}
260
261#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollector")]
262impl<__T: IDiagnosticEventCollector> IDiagnosticEventCollectorMethods for __T {}
263
264#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollector")]
265impl DiagnosticEventCollector {
266 pub fn find_or_create_global_instance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
267 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
268 }
269
270 pub fn register_event_handler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
271 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
272 }
273
274 pub fn unregister_event_handler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
275 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
276 }
277
278 pub fn post_event_method_info() -> &'static ::unity::il2cpp::MethodInfo {
279 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
280 }
281
282 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
283 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
284 }
285}
286
287#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollector")]
288impl DiagnosticEventCollector {
289 #[doc = "`.ctor()` — no args"]
290 pub fn new() -> Self {
291 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
292 panic!(
293 "{}
294::{}
295 failed to instantiate",
296 ::core::stringify!(DiagnosticEventCollector),
297 ::core::stringify!(new),
298 )
299 });
300 <Self as IDiagnosticEventCollectorMethods>::ctor(this);
301 this
302 }
303}
304
305#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollector")]
306#[doc(hidden)]
307pub mod prelude {
308 pub use super::{DiagnosticEventCollector, IDiagnosticEventCollector, IDiagnosticEventCollectorMethods};
309 #[cfg(feature = "system-object")]
310 pub use crate::system::object::IObjectMethods;
311 #[cfg(feature = "unity_engine-behaviour")]
312 pub use crate::unity_engine::behaviour::IBehaviourMethods;
313 #[cfg(feature = "unity_engine-component")]
314 pub use crate::unity_engine::component::IComponentMethods;
315 #[cfg(feature = "unity_engine-monobehaviour")]
316 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
317 #[cfg(feature = "unity_engine-object_2")]
318 pub use crate::unity_engine::object_2::IObject_2Methods;
319 pub use crate::{
320 system::object::IObject,
321 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
322 };
323}