1#[cfg(feature = "system-reflection-fieldinfo-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 reflection::memberinfo::{IMemberInfo, MemberInfo},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/fieldinfo/FieldInfo.md"))]
14 #[::unity::class(namespace = "System.Reflection", name = "FieldInfo")]
15 #[parent(crate::system::reflection::memberinfo::MemberInfo)]
16 pub struct FieldInfo {}
17}
18
19#[cfg(feature = "system-reflection-fieldinfo-types")]
20pub use __types::*;
21
22#[cfg(feature = "system-reflection-fieldinfo")]
23impl FieldInfo {
24 #[doc = "`internal_from_handle_type(::unity::IntPtr, ::unity::IntPtr)` overload"]
25 pub fn internal_from_handle_type(
26 field_handle: impl ::core::convert::Into<::unity::IntPtr>,
27 type_handle: impl ::core::convert::Into<::unity::IntPtr>,
28 ) -> crate::system::reflection::fieldinfo::FieldInfo {
29 unsafe {
30 ::unity::il2cpp_call!((::unity::module_base()+0x3ad9720usize)as*mut u8,crate::system::reflection::fieldinfo::FieldInfo;
31(::unity::IntPtr)::core::convert::Into::into(field_handle),(::unity::IntPtr)::core::convert::Into::into(type_handle))
32 }
33 }
34
35 #[doc = "`op_Equality(crate::system::reflection::fieldinfo::FieldInfo, crate::system::reflection::fieldinfo::FieldInfo)` overload"]
36 pub fn op_equality(
37 left: impl ::core::convert::Into<crate::system::reflection::fieldinfo::FieldInfo>,
38 right: impl ::core::convert::Into<crate::system::reflection::fieldinfo::FieldInfo>,
39 ) -> bool {
40 unsafe {
41 ::unity::il2cpp_call!((::unity::module_base()+0x3ad98b0usize)as*mut u8,bool;
42(crate::system::reflection::fieldinfo::FieldInfo)::core::convert::Into::into(left),(crate::system::reflection::fieldinfo::FieldInfo)::core::convert::Into::into(right))
43 }
44 }
45
46 #[doc = "`op_Inequality(crate::system::reflection::fieldinfo::FieldInfo, crate::system::reflection::fieldinfo::FieldInfo)` overload"]
47 pub fn op_inequality(
48 left: impl ::core::convert::Into<crate::system::reflection::fieldinfo::FieldInfo>,
49 right: impl ::core::convert::Into<crate::system::reflection::fieldinfo::FieldInfo>,
50 ) -> bool {
51 unsafe {
52 ::unity::il2cpp_call!((::unity::module_base()+0x3ad9c70usize)as*mut u8,bool;
53(crate::system::reflection::fieldinfo::FieldInfo)::core::convert::Into::into(left),(crate::system::reflection::fieldinfo::FieldInfo)::core::convert::Into::into(right))
54 }
55 }
56}
57
58#[cfg(feature = "system-reflection-fieldinfo")]
59pub trait IFieldInfoMethods: IFieldInfo {
60 #[doc = "`get_Attributes()` overload"]
61 fn get_attributes(self) -> crate::system::reflection::fieldattributes::FieldAttributes {
62 unsafe {
63 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
64 {
65 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
66 let __vi = *__vt.get(16usize).unwrap_or_else(|| {
67 panic!(
68 "unity: virtual slot {}
69 out of range (vtable len {}
70) on the runtime class behind {}
71 (method `{}
72`)",
73 16usize,
74 __vt.len(),
75 <FieldInfo as ::unity::ClassIdentity>::NAME,
76 "get_Attributes",
77 )
78 });
79 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> crate::system::reflection::fieldattributes::FieldAttributes =
80 ::core::mem::transmute(__vi.method_ptr);
81 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
82 __inner(__receiver, __mi)
83 }
84 }
85 }
86 #[doc = "`.ctor()` overload"]
87 fn ctor(self) -> () {
88 unsafe {
89 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90 ::unity::il2cpp_call!((::unity::module_base()+0x3ad94d0usize)as*mut u8,();
91(FieldInfo)__receiver)
92 }
93 }
94 #[doc = "`get_FieldType()` overload"]
95 fn get_field_type(self) -> ::unity::SystemType {
96 unsafe {
97 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
98 {
99 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
100 let __vi = *__vt.get(18usize).unwrap_or_else(|| {
101 panic!(
102 "unity: virtual slot {}
103 out of range (vtable len {}
104) on the runtime class behind {}
105 (method `{}
106`)",
107 18usize,
108 __vt.len(),
109 <FieldInfo as ::unity::ClassIdentity>::NAME,
110 "get_FieldType",
111 )
112 });
113 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__vi.method_ptr);
114 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
115 __inner(__receiver, __mi)
116 }
117 }
118 }
119 #[doc = "`GetValue(crate::system::object::Object)` overload"]
120 fn get_value(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> crate::system::object::Object {
121 unsafe {
122 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
123 {
124 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
125 let __vi = *__vt.get(19usize).unwrap_or_else(|| {
126 panic!(
127 "unity: virtual slot {}
128 out of range (vtable len {}
129) on the runtime class behind {}
130 (method `{}
131`)",
132 19usize,
133 __vt.len(),
134 <FieldInfo as ::unity::ClassIdentity>::NAME,
135 "GetValue",
136 )
137 });
138 let __inner: extern "C" fn(FieldInfo, crate::system::object::Object, ::unity::OptionalMethod) -> crate::system::object::Object =
139 ::core::mem::transmute(__vi.method_ptr);
140 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
141 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
142 }
143 }
144 }
145 #[doc = "`get_MemberType()` overload"]
146 fn get_member_type(self) -> crate::system::reflection::membertypes::MemberTypes {
147 unsafe {
148 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
149 {
150 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
151 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
152 panic!(
153 "unity: virtual slot {}
154 out of range (vtable len {}
155) on the runtime class behind {}
156 (method `{}
157`)",
158 6usize,
159 __vt.len(),
160 <FieldInfo as ::unity::ClassIdentity>::NAME,
161 "get_MemberType",
162 )
163 });
164 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> crate::system::reflection::membertypes::MemberTypes =
165 ::core::mem::transmute(__vi.method_ptr);
166 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
167 __inner(__receiver, __mi)
168 }
169 }
170 }
171 #[doc = "`get_IsLiteral()` overload"]
172 fn get_is_literal(self) -> bool {
173 unsafe {
174 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
175 {
176 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
177 let __vi = *__vt.get(20usize).unwrap_or_else(|| {
178 panic!(
179 "unity: virtual slot {}
180 out of range (vtable len {}
181) on the runtime class behind {}
182 (method `{}
183`)",
184 20usize,
185 __vt.len(),
186 <FieldInfo as ::unity::ClassIdentity>::NAME,
187 "get_IsLiteral",
188 )
189 });
190 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
191 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
192 __inner(__receiver, __mi)
193 }
194 }
195 }
196 #[doc = "`get_IsStatic()` overload"]
197 fn get_is_static(self) -> bool {
198 unsafe {
199 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
200 {
201 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
202 let __vi = *__vt.get(21usize).unwrap_or_else(|| {
203 panic!(
204 "unity: virtual slot {}
205 out of range (vtable len {}
206) on the runtime class behind {}
207 (method `{}
208`)",
209 21usize,
210 __vt.len(),
211 <FieldInfo as ::unity::ClassIdentity>::NAME,
212 "get_IsStatic",
213 )
214 });
215 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
216 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
217 __inner(__receiver, __mi)
218 }
219 }
220 }
221 #[doc = "`get_IsInitOnly()` overload"]
222 fn get_is_init_only(self) -> bool {
223 unsafe {
224 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
225 {
226 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
227 let __vi = *__vt.get(22usize).unwrap_or_else(|| {
228 panic!(
229 "unity: virtual slot {}
230 out of range (vtable len {}
231) on the runtime class behind {}
232 (method `{}
233`)",
234 22usize,
235 __vt.len(),
236 <FieldInfo as ::unity::ClassIdentity>::NAME,
237 "get_IsInitOnly",
238 )
239 });
240 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
241 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
242 __inner(__receiver, __mi)
243 }
244 }
245 }
246 #[doc = "`get_IsPublic()` overload"]
247 fn get_is_public(self) -> bool {
248 unsafe {
249 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
250 {
251 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
252 let __vi = *__vt.get(23usize).unwrap_or_else(|| {
253 panic!(
254 "unity: virtual slot {}
255 out of range (vtable len {}
256) on the runtime class behind {}
257 (method `{}
258`)",
259 23usize,
260 __vt.len(),
261 <FieldInfo as ::unity::ClassIdentity>::NAME,
262 "get_IsPublic",
263 )
264 });
265 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
266 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
267 __inner(__receiver, __mi)
268 }
269 }
270 }
271 #[doc = "`get_IsPrivate()` overload"]
272 fn get_is_private(self) -> bool {
273 unsafe {
274 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
275 {
276 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
277 let __vi = *__vt.get(24usize).unwrap_or_else(|| {
278 panic!(
279 "unity: virtual slot {}
280 out of range (vtable len {}
281) on the runtime class behind {}
282 (method `{}
283`)",
284 24usize,
285 __vt.len(),
286 <FieldInfo as ::unity::ClassIdentity>::NAME,
287 "get_IsPrivate",
288 )
289 });
290 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
291 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
292 __inner(__receiver, __mi)
293 }
294 }
295 }
296 #[doc = "`get_IsFamily()` overload"]
297 fn get_is_family(self) -> bool {
298 unsafe {
299 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
300 {
301 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
302 let __vi = *__vt.get(25usize).unwrap_or_else(|| {
303 panic!(
304 "unity: virtual slot {}
305 out of range (vtable len {}
306) on the runtime class behind {}
307 (method `{}
308`)",
309 25usize,
310 __vt.len(),
311 <FieldInfo as ::unity::ClassIdentity>::NAME,
312 "get_IsFamily",
313 )
314 });
315 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
316 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
317 __inner(__receiver, __mi)
318 }
319 }
320 }
321 #[doc = "`get_IsAssembly()` overload"]
322 fn get_is_assembly(self) -> bool {
323 unsafe {
324 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
325 {
326 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
327 let __vi = *__vt.get(26usize).unwrap_or_else(|| {
328 panic!(
329 "unity: virtual slot {}
330 out of range (vtable len {}
331) on the runtime class behind {}
332 (method `{}
333`)",
334 26usize,
335 __vt.len(),
336 <FieldInfo as ::unity::ClassIdentity>::NAME,
337 "get_IsAssembly",
338 )
339 });
340 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
341 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
342 __inner(__receiver, __mi)
343 }
344 }
345 }
346 #[doc = "`get_IsFamilyAndAssembly()` overload"]
347 fn get_is_family_and_assembly(self) -> bool {
348 unsafe {
349 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
350 {
351 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
352 let __vi = *__vt.get(27usize).unwrap_or_else(|| {
353 panic!(
354 "unity: virtual slot {}
355 out of range (vtable len {}
356) on the runtime class behind {}
357 (method `{}
358`)",
359 27usize,
360 __vt.len(),
361 <FieldInfo as ::unity::ClassIdentity>::NAME,
362 "get_IsFamilyAndAssembly",
363 )
364 });
365 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
366 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
367 __inner(__receiver, __mi)
368 }
369 }
370 }
371 #[doc = "`get_IsFamilyOrAssembly()` overload"]
372 fn get_is_family_or_assembly(self) -> bool {
373 unsafe {
374 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
375 {
376 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
377 let __vi = *__vt.get(28usize).unwrap_or_else(|| {
378 panic!(
379 "unity: virtual slot {}
380 out of range (vtable len {}
381) on the runtime class behind {}
382 (method `{}
383`)",
384 28usize,
385 __vt.len(),
386 <FieldInfo as ::unity::ClassIdentity>::NAME,
387 "get_IsFamilyOrAssembly",
388 )
389 });
390 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
391 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
392 __inner(__receiver, __mi)
393 }
394 }
395 }
396 #[doc = "`get_IsSpecialName()` overload"]
397 fn get_is_special_name(self) -> bool {
398 unsafe {
399 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
400 {
401 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
402 let __vi = *__vt.get(29usize).unwrap_or_else(|| {
403 panic!(
404 "unity: virtual slot {}
405 out of range (vtable len {}
406) on the runtime class behind {}
407 (method `{}
408`)",
409 29usize,
410 __vt.len(),
411 <FieldInfo as ::unity::ClassIdentity>::NAME,
412 "get_IsSpecialName",
413 )
414 });
415 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
416 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
417 __inner(__receiver, __mi)
418 }
419 }
420 }
421 #[doc = "`get_IsNotSerialized()` overload"]
422 fn get_is_not_serialized(self) -> bool {
423 unsafe {
424 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
425 {
426 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
427 let __vi = *__vt.get(30usize).unwrap_or_else(|| {
428 panic!(
429 "unity: virtual slot {}
430 out of range (vtable len {}
431) on the runtime class behind {}
432 (method `{}
433`)",
434 30usize,
435 __vt.len(),
436 <FieldInfo as ::unity::ClassIdentity>::NAME,
437 "get_IsNotSerialized",
438 )
439 });
440 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
441 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
442 __inner(__receiver, __mi)
443 }
444 }
445 }
446 #[doc = "`SetValue(crate::system::object::Object, crate::system::object::Object)` overload"]
447 fn set_value(
448 self,
449 obj: impl ::core::convert::Into<crate::system::object::Object>,
450 value: impl ::core::convert::Into<crate::system::object::Object>,
451 ) -> () {
452 unsafe {
453 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
454 {
455 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
456 let __vi = *__vt.get(32usize).unwrap_or_else(|| {
457 panic!(
458 "unity: virtual slot {}
459 out of range (vtable len {}
460) on the runtime class behind {}
461 (method `{}
462`)",
463 32usize,
464 __vt.len(),
465 <FieldInfo as ::unity::ClassIdentity>::NAME,
466 "SetValue",
467 )
468 });
469 let __inner: extern "C" fn(FieldInfo, crate::system::object::Object, crate::system::object::Object, ::unity::OptionalMethod) -> () =
470 ::core::mem::transmute(__vi.method_ptr);
471 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
472 __inner(__receiver, ::core::convert::Into::into(obj), ::core::convert::Into::into(value), __mi)
473 }
474 }
475 }
476 #[doc = "`GetFieldOffset()` overload"]
477 fn get_field_offset(self) -> i32 {
478 unsafe {
479 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
480 {
481 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
482 let __vi = *__vt.get(33usize).unwrap_or_else(|| {
483 panic!(
484 "unity: virtual slot {}
485 out of range (vtable len {}
486) on the runtime class behind {}
487 (method `{}
488`)",
489 33usize,
490 __vt.len(),
491 <FieldInfo as ::unity::ClassIdentity>::NAME,
492 "GetFieldOffset",
493 )
494 });
495 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
496 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
497 __inner(__receiver, __mi)
498 }
499 }
500 }
501 #[doc = "`GetPseudoCustomAttributes()` overload"]
502 fn get_pseudo_custom_attributes(self) -> ::unity::Array<crate::system::object::Object> {
503 unsafe {
504 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
505 ::unity::il2cpp_call!((::unity::module_base()+0x3ad99c0usize)as*mut u8, ::unity::Array<crate::system::object::Object> ;
506(FieldInfo)__receiver)
507 }
508 }
509 #[doc = "`GetRawConstantValue()` overload"]
510 fn get_raw_constant_value(self) -> crate::system::object::Object {
511 unsafe {
512 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
513 {
514 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
515 let __vi = *__vt.get(35usize).unwrap_or_else(|| {
516 panic!(
517 "unity: virtual slot {}
518 out of range (vtable len {}
519) on the runtime class behind {}
520 (method `{}
521`)",
522 35usize,
523 __vt.len(),
524 <FieldInfo as ::unity::ClassIdentity>::NAME,
525 "GetRawConstantValue",
526 )
527 });
528 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> crate::system::object::Object =
529 ::core::mem::transmute(__vi.method_ptr);
530 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
531 __inner(__receiver, __mi)
532 }
533 }
534 }
535 #[doc = "`Equals(crate::system::object::Object)` overload"]
536 fn equals(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
537 unsafe {
538 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
539 {
540 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
541 let __vi = *__vt.get(0usize).unwrap_or_else(|| {
542 panic!(
543 "unity: virtual slot {}
544 out of range (vtable len {}
545) on the runtime class behind {}
546 (method `{}
547`)",
548 0usize,
549 __vt.len(),
550 <FieldInfo as ::unity::ClassIdentity>::NAME,
551 "Equals",
552 )
553 });
554 let __inner: extern "C" fn(FieldInfo, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
555 ::core::mem::transmute(__vi.method_ptr);
556 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
557 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
558 }
559 }
560 }
561 #[doc = "`GetHashCode()` overload"]
562 fn get_hash_code(self) -> i32 {
563 unsafe {
564 let __receiver = <FieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
565 {
566 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
567 let __vi = *__vt.get(2usize).unwrap_or_else(|| {
568 panic!(
569 "unity: virtual slot {}
570 out of range (vtable len {}
571) on the runtime class behind {}
572 (method `{}
573`)",
574 2usize,
575 __vt.len(),
576 <FieldInfo as ::unity::ClassIdentity>::NAME,
577 "GetHashCode",
578 )
579 });
580 let __inner: extern "C" fn(FieldInfo, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
581 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
582 __inner(__receiver, __mi)
583 }
584 }
585 }
586}
587
588#[cfg(feature = "system-reflection-fieldinfo")]
589impl<__T: IFieldInfo> IFieldInfoMethods for __T {}
590
591#[cfg(feature = "system-reflection-fieldinfo")]
592impl FieldInfo {
593 pub fn get_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
594 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
595 }
596
597 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
598 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
599 }
600
601 pub fn get_field_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
602 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
603 }
604
605 pub fn get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
606 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
607 }
608
609 pub fn get_member_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
610 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
611 }
612
613 pub fn get_is_literal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
614 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
615 }
616
617 pub fn get_is_static_method_info() -> &'static ::unity::il2cpp::MethodInfo {
618 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
619 }
620
621 pub fn get_is_init_only_method_info() -> &'static ::unity::il2cpp::MethodInfo {
622 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
623 }
624
625 pub fn get_is_public_method_info() -> &'static ::unity::il2cpp::MethodInfo {
626 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
627 }
628
629 pub fn get_is_private_method_info() -> &'static ::unity::il2cpp::MethodInfo {
630 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
631 }
632
633 pub fn get_is_family_method_info() -> &'static ::unity::il2cpp::MethodInfo {
634 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
635 }
636
637 pub fn get_is_assembly_method_info() -> &'static ::unity::il2cpp::MethodInfo {
638 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
639 }
640
641 pub fn get_is_family_and_assembly_method_info() -> &'static ::unity::il2cpp::MethodInfo {
642 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
643 }
644
645 pub fn get_is_family_or_assembly_method_info() -> &'static ::unity::il2cpp::MethodInfo {
646 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
647 }
648
649 pub fn get_is_special_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
650 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
651 }
652
653 pub fn get_is_not_serialized_method_info() -> &'static ::unity::il2cpp::MethodInfo {
654 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
655 }
656
657 pub fn set_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
658 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
659 }
660
661 pub fn internal_from_handle_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
662 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
663 }
664
665 pub fn get_field_offset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
666 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
667 }
668
669 pub fn get_pseudo_custom_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
670 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
671 }
672
673 pub fn get_raw_constant_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
674 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
675 }
676
677 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
678 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[27]
679 }
680
681 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
682 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[28]
683 }
684
685 pub fn op_equality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
686 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[29]
687 }
688
689 pub fn op_inequality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
690 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[30]
691 }
692}
693
694#[cfg(feature = "system-reflection-fieldinfo")]
695impl FieldInfo {
696 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_Attributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
697 pub unsafe fn get_attributes(
698 this: impl ::core::convert::Into<::unity::IlInstance>,
699 ) -> crate::system::reflection::fieldattributes::FieldAttributes {
700 let __mi = Self::get_attributes_method_info();
701 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::fieldattributes::FieldAttributes =
702 ::core::mem::transmute(__mi.method_ptr);
703 __inner(this.into(), ::core::option::Option::None)
704 }
705
706 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_FieldType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
707 pub unsafe fn get_field_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
708 let __mi = Self::get_field_type_method_info();
709 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
710 __inner(this.into(), ::core::option::Option::None)
711 }
712
713 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `GetValue`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
714 pub unsafe fn get_value(
715 this: impl ::core::convert::Into<::unity::IlInstance>,
716 obj: crate::system::object::Object,
717 ) -> crate::system::object::Object {
718 let __mi = Self::get_value_method_info();
719 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> crate::system::object::Object =
720 ::core::mem::transmute(__mi.method_ptr);
721 __inner(this.into(), obj, ::core::option::Option::None)
722 }
723
724 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_MemberType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
725 pub unsafe fn get_member_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::reflection::membertypes::MemberTypes {
726 let __mi = Self::get_member_type_method_info();
727 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::membertypes::MemberTypes =
728 ::core::mem::transmute(__mi.method_ptr);
729 __inner(this.into(), ::core::option::Option::None)
730 }
731
732 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsLiteral`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
733 pub unsafe fn get_is_literal(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
734 let __mi = Self::get_is_literal_method_info();
735 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
736 __inner(this.into(), ::core::option::Option::None)
737 }
738
739 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsStatic`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
740 pub unsafe fn get_is_static(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
741 let __mi = Self::get_is_static_method_info();
742 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
743 __inner(this.into(), ::core::option::Option::None)
744 }
745
746 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsInitOnly`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
747 pub unsafe fn get_is_init_only(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
748 let __mi = Self::get_is_init_only_method_info();
749 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
750 __inner(this.into(), ::core::option::Option::None)
751 }
752
753 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsPublic`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
754 pub unsafe fn get_is_public(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
755 let __mi = Self::get_is_public_method_info();
756 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
757 __inner(this.into(), ::core::option::Option::None)
758 }
759
760 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsPrivate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
761 pub unsafe fn get_is_private(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
762 let __mi = Self::get_is_private_method_info();
763 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
764 __inner(this.into(), ::core::option::Option::None)
765 }
766
767 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsFamily`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
768 pub unsafe fn get_is_family(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
769 let __mi = Self::get_is_family_method_info();
770 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
771 __inner(this.into(), ::core::option::Option::None)
772 }
773
774 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsAssembly`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
775 pub unsafe fn get_is_assembly(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
776 let __mi = Self::get_is_assembly_method_info();
777 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
778 __inner(this.into(), ::core::option::Option::None)
779 }
780
781 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsFamilyAndAssembly`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
782 pub unsafe fn get_is_family_and_assembly(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
783 let __mi = Self::get_is_family_and_assembly_method_info();
784 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
785 __inner(this.into(), ::core::option::Option::None)
786 }
787
788 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsFamilyOrAssembly`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
789 pub unsafe fn get_is_family_or_assembly(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
790 let __mi = Self::get_is_family_or_assembly_method_info();
791 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
792 __inner(this.into(), ::core::option::Option::None)
793 }
794
795 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsSpecialName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
796 pub unsafe fn get_is_special_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
797 let __mi = Self::get_is_special_name_method_info();
798 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
799 __inner(this.into(), ::core::option::Option::None)
800 }
801
802 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `get_IsNotSerialized`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
803 pub unsafe fn get_is_not_serialized(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
804 let __mi = Self::get_is_not_serialized_method_info();
805 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
806 __inner(this.into(), ::core::option::Option::None)
807 }
808
809 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `SetValue`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
810 pub unsafe fn set_value(
811 this: impl ::core::convert::Into<::unity::IlInstance>,
812 obj: crate::system::object::Object,
813 value: crate::system::object::Object,
814 ) -> () {
815 let __mi = Self::set_value_method_info();
816 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, crate::system::object::Object, ::unity::OptionalMethod) -> () =
817 ::core::mem::transmute(__mi.method_ptr);
818 __inner(this.into(), obj, value, ::core::option::Option::None)
819 }
820
821 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `GetFieldOffset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
822 pub unsafe fn get_field_offset(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
823 let __mi = Self::get_field_offset_method_info();
824 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
825 __inner(this.into(), ::core::option::Option::None)
826 }
827
828 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `GetRawConstantValue`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
829 pub unsafe fn get_raw_constant_value(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::object::Object {
830 let __mi = Self::get_raw_constant_value_method_info();
831 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::object::Object =
832 ::core::mem::transmute(__mi.method_ptr);
833 __inner(this.into(), ::core::option::Option::None)
834 }
835
836 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
837 pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
838 let __mi = Self::equals_method_info();
839 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
840 ::core::mem::transmute(__mi.method_ptr);
841 __inner(this.into(), obj, ::core::option::Option::None)
842 }
843
844 #[doc = "Direct (non-virtual) call to `FieldInfo`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
845 pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
846 let __mi = Self::get_hash_code_method_info();
847 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
848 __inner(this.into(), ::core::option::Option::None)
849 }
850}
851
852#[cfg(feature = "system-reflection-fieldinfo")]
853impl FieldInfo {
854 #[doc = "`.ctor()` — no args"]
855 pub fn new() -> Self {
856 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
857 panic!(
858 "{}
859::{}
860 failed to instantiate",
861 ::core::stringify!(FieldInfo),
862 ::core::stringify!(new),
863 )
864 });
865 <Self as IFieldInfoMethods>::ctor(this);
866 this
867 }
868}
869
870#[cfg(feature = "system-reflection-fieldinfo")]
871#[doc(hidden)]
872pub mod prelude {
873 pub use super::{FieldInfo, IFieldInfo, IFieldInfoMethods};
874 #[cfg(feature = "system-object")]
875 pub use crate::system::object::IObjectMethods;
876 #[cfg(feature = "system-reflection-memberinfo")]
877 pub use crate::system::reflection::memberinfo::IMemberInfoMethods;
878 pub use crate::system::{object::IObject, reflection::memberinfo::IMemberInfo};
879}