Skip to main content

engage/generated/system/reflection/
runtimefieldinfo.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-reflection-runtimefieldinfo-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        reflection::{
11            fieldinfo::{FieldInfo, IFieldInfo},
12            memberinfo::{IMemberInfo, MemberInfo},
13        },
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/runtimefieldinfo/RuntimeFieldInfo.md"))]
17    #[::unity::class(namespace = "System.Reflection", name = "RuntimeFieldInfo")]
18    #[parent(crate::system::reflection::fieldinfo::FieldInfo)]
19    pub struct RuntimeFieldInfo {}
20}
21
22#[cfg(feature = "system-reflection-runtimefieldinfo-types")]
23pub use __types::*;
24
25#[cfg(feature = "system-reflection-runtimefieldinfo")]
26pub trait IRuntimeFieldInfoMethods: IRuntimeFieldInfo {
27    #[doc = "`get_BindingFlags()` overload"]
28    fn get_binding_flags(self) -> crate::system::reflection::bindingflags::BindingFlags {
29        unsafe {
30            let __receiver = <RuntimeFieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
31            ::unity::il2cpp_call!((::unity::module_base()+0x2fd49e0usize)as*mut u8,crate::system::reflection::bindingflags::BindingFlags;
32(RuntimeFieldInfo)__receiver)
33        }
34    }
35    #[doc = "`get_Module()` overload"]
36    fn get_module(self) -> crate::system::reflection::module::Module {
37        unsafe {
38            let __receiver = <RuntimeFieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
39            {
40                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
41                let __vi = *__vt.get(15usize).unwrap_or_else(|| {
42                    panic!(
43                        "unity: virtual slot {}
44 out of range (vtable len {}
45) on the runtime class behind {}
46 (method `{}
47`)",
48                        15usize,
49                        __vt.len(),
50                        <RuntimeFieldInfo as ::unity::ClassIdentity>::NAME,
51                        "get_Module",
52                    )
53                });
54                let __inner: extern "C" fn(RuntimeFieldInfo, ::unity::OptionalMethod) -> crate::system::reflection::module::Module =
55                    ::core::mem::transmute(__vi.method_ptr);
56                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
57                __inner(__receiver, __mi)
58            }
59        }
60    }
61    #[doc = "`GetDeclaringTypeInternal()` overload"]
62    fn get_declaring_type_internal(self) -> crate::system::runtimetype::RuntimeType {
63        unsafe {
64            let __receiver = <RuntimeFieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
65            ::unity::il2cpp_call!((::unity::module_base()+0x2fd4b10usize)as*mut u8,crate::system::runtimetype::RuntimeType;
66(RuntimeFieldInfo)__receiver)
67        }
68    }
69    #[doc = "`get_ReflectedTypeInternal()` overload"]
70    fn get_reflected_type_internal(self) -> crate::system::runtimetype::RuntimeType {
71        unsafe {
72            let __receiver = <RuntimeFieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
73            ::unity::il2cpp_call!((::unity::module_base()+0x2fd4ba0usize)as*mut u8,crate::system::runtimetype::RuntimeType;
74(RuntimeFieldInfo)__receiver)
75        }
76    }
77    #[doc = "`GetRuntimeModule()` overload"]
78    fn get_runtime_module(self) -> crate::system::reflection::runtimemodule::RuntimeModule {
79        unsafe {
80            let __receiver = <RuntimeFieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
81            ::unity::il2cpp_call!((::unity::module_base()+0x2fd4a80usize)as*mut u8,crate::system::reflection::runtimemodule::RuntimeModule;
82(RuntimeFieldInfo)__receiver)
83        }
84    }
85    #[doc = "`.ctor()` overload"]
86    fn ctor(self) -> () {
87        unsafe {
88            let __receiver = <RuntimeFieldInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
89            ::unity::il2cpp_call!((::unity::module_base()+0x2fd3680usize)as*mut u8,();
90(RuntimeFieldInfo)__receiver)
91        }
92    }
93}
94
95#[cfg(feature = "system-reflection-runtimefieldinfo")]
96impl<__T: IRuntimeFieldInfo> IRuntimeFieldInfoMethods for __T {}
97
98#[cfg(feature = "system-reflection-runtimefieldinfo")]
99impl RuntimeFieldInfo {
100    pub fn get_binding_flags_method_info() -> &'static ::unity::il2cpp::MethodInfo {
101        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
102    }
103
104    pub fn get_module_method_info() -> &'static ::unity::il2cpp::MethodInfo {
105        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
106    }
107
108    pub fn get_declaring_type_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
109        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
110    }
111
112    pub fn get_reflected_type_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
113        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
114    }
115
116    pub fn get_runtime_module_method_info() -> &'static ::unity::il2cpp::MethodInfo {
117        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
118    }
119
120    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
121        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
122    }
123}
124
125#[cfg(feature = "system-reflection-runtimefieldinfo")]
126impl RuntimeFieldInfo {
127    #[doc = "Direct (non-virtual) call to `RuntimeFieldInfo`'s own `get_Module`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
128    pub unsafe fn get_module(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::reflection::module::Module {
129        let __mi = Self::get_module_method_info();
130        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::module::Module =
131            ::core::mem::transmute(__mi.method_ptr);
132        __inner(this.into(), ::core::option::Option::None)
133    }
134}
135
136#[cfg(feature = "system-reflection-runtimefieldinfo")]
137impl RuntimeFieldInfo {
138    #[doc = "`.ctor()` — no args"]
139    pub fn new() -> Self {
140        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
141            panic!(
142                "{}
143::{}
144 failed to instantiate",
145                ::core::stringify!(RuntimeFieldInfo),
146                ::core::stringify!(new),
147            )
148        });
149        <Self as IRuntimeFieldInfoMethods>::ctor(this);
150        this
151    }
152}
153
154#[cfg(feature = "system-reflection-runtimefieldinfo")]
155#[doc(hidden)]
156pub mod prelude {
157    pub use super::{IRuntimeFieldInfo, IRuntimeFieldInfoMethods, RuntimeFieldInfo};
158    #[cfg(feature = "system-object")]
159    pub use crate::system::object::IObjectMethods;
160    #[cfg(feature = "system-reflection-fieldinfo")]
161    pub use crate::system::reflection::fieldinfo::IFieldInfoMethods;
162    #[cfg(feature = "system-reflection-memberinfo")]
163    pub use crate::system::reflection::memberinfo::IMemberInfoMethods;
164    pub use crate::system::{
165        object::IObject,
166        reflection::{fieldinfo::IFieldInfo, memberinfo::IMemberInfo},
167    };
168}