Skip to main content

engage/generated/system/reflection/emit/
fieldbuilder.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-reflection-emit-fieldbuilder-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/emit/fieldbuilder/FieldBuilder.md"))]
17    #[::unity::class(namespace = "System.Reflection.Emit", name = "FieldBuilder")]
18    #[parent(crate::system::reflection::fieldinfo::FieldInfo)]
19    pub struct FieldBuilder {}
20}
21
22#[cfg(feature = "system-reflection-emit-fieldbuilder-types")]
23pub use __types::*;
24
25#[cfg(feature = "system-reflection-emit-fieldbuilder")]
26pub trait IFieldBuilderMethods: IFieldBuilder {
27    #[doc = "`get_Attributes()` overload"]
28    fn get_attributes(self) -> crate::system::reflection::fieldattributes::FieldAttributes {
29        unsafe {
30            let __receiver = <FieldBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
31            {
32                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
33                let __vi = *__vt.get(16usize).unwrap_or_else(|| {
34                    panic!(
35                        "unity: virtual slot {}
36 out of range (vtable len {}
37) on the runtime class behind {}
38 (method `{}
39`)",
40                        16usize,
41                        __vt.len(),
42                        <FieldBuilder as ::unity::ClassIdentity>::NAME,
43                        "get_Attributes",
44                    )
45                });
46                let __inner: extern "C" fn(FieldBuilder, ::unity::OptionalMethod) -> crate::system::reflection::fieldattributes::FieldAttributes =
47                    ::core::mem::transmute(__vi.method_ptr);
48                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
49                __inner(__receiver, __mi)
50            }
51        }
52    }
53    #[doc = "`get_DeclaringType()` overload"]
54    fn get_declaring_type(self) -> ::unity::SystemType {
55        unsafe {
56            let __receiver = <FieldBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
57            {
58                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
59                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
60                    panic!(
61                        "unity: virtual slot {}
62 out of range (vtable len {}
63) on the runtime class behind {}
64 (method `{}
65`)",
66                        8usize,
67                        __vt.len(),
68                        <FieldBuilder as ::unity::ClassIdentity>::NAME,
69                        "get_DeclaringType",
70                    )
71                });
72                let __inner: extern "C" fn(FieldBuilder, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__vi.method_ptr);
73                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
74                __inner(__receiver, __mi)
75            }
76        }
77    }
78    #[doc = "`get_FieldType()` overload"]
79    fn get_field_type(self) -> ::unity::SystemType {
80        unsafe {
81            let __receiver = <FieldBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
82            {
83                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
84                let __vi = *__vt.get(18usize).unwrap_or_else(|| {
85                    panic!(
86                        "unity: virtual slot {}
87 out of range (vtable len {}
88) on the runtime class behind {}
89 (method `{}
90`)",
91                        18usize,
92                        __vt.len(),
93                        <FieldBuilder as ::unity::ClassIdentity>::NAME,
94                        "get_FieldType",
95                    )
96                });
97                let __inner: extern "C" fn(FieldBuilder, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__vi.method_ptr);
98                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
99                __inner(__receiver, __mi)
100            }
101        }
102    }
103    #[doc = "`get_Name()` overload"]
104    fn get_name(self) -> ::unity::Il2CppString {
105        unsafe {
106            let __receiver = <FieldBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
107            {
108                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
109                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
110                    panic!(
111                        "unity: virtual slot {}
112 out of range (vtable len {}
113) on the runtime class behind {}
114 (method `{}
115`)",
116                        7usize,
117                        __vt.len(),
118                        <FieldBuilder as ::unity::ClassIdentity>::NAME,
119                        "get_Name",
120                    )
121                });
122                let __inner: extern "C" fn(FieldBuilder, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
123                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
124                __inner(__receiver, __mi)
125            }
126        }
127    }
128    #[doc = "`GetValue(crate::system::object::Object)` overload"]
129    fn get_value(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> crate::system::object::Object {
130        unsafe {
131            let __receiver = <FieldBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
132            {
133                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
134                let __vi = *__vt.get(19usize).unwrap_or_else(|| {
135                    panic!(
136                        "unity: virtual slot {}
137 out of range (vtable len {}
138) on the runtime class behind {}
139 (method `{}
140`)",
141                        19usize,
142                        __vt.len(),
143                        <FieldBuilder as ::unity::ClassIdentity>::NAME,
144                        "GetValue",
145                    )
146                });
147                let __inner: extern "C" fn(FieldBuilder, crate::system::object::Object, ::unity::OptionalMethod) -> crate::system::object::Object =
148                    ::core::mem::transmute(__vi.method_ptr);
149                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
150                __inner(__receiver, ::core::convert::Into::into(obj), __mi)
151            }
152        }
153    }
154    #[doc = "`get_ReflectedType()` overload"]
155    fn get_reflected_type(self) -> ::unity::SystemType {
156        unsafe {
157            let __receiver = <FieldBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
158            {
159                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
160                let __vi = *__vt.get(9usize).unwrap_or_else(|| {
161                    panic!(
162                        "unity: virtual slot {}
163 out of range (vtable len {}
164) on the runtime class behind {}
165 (method `{}
166`)",
167                        9usize,
168                        __vt.len(),
169                        <FieldBuilder as ::unity::ClassIdentity>::NAME,
170                        "get_ReflectedType",
171                    )
172                });
173                let __inner: extern "C" fn(FieldBuilder, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__vi.method_ptr);
174                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
175                __inner(__receiver, __mi)
176            }
177        }
178    }
179    #[doc = "`GetCustomAttributes(bool)` overload"]
180    fn get_custom_attributes(self, inherit: impl ::core::convert::Into<bool>) -> ::unity::Array<crate::system::object::Object> {
181        unsafe {
182            let __receiver = <FieldBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
183            {
184                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
185                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
186                    panic!(
187                        "unity: virtual slot {}
188 out of range (vtable len {}
189) on the runtime class behind {}
190 (method `{}
191`)",
192                        10usize,
193                        __vt.len(),
194                        <FieldBuilder as ::unity::ClassIdentity>::NAME,
195                        "GetCustomAttributes",
196                    )
197                });
198                let __inner: extern "C" fn(FieldBuilder, bool, ::unity::OptionalMethod) -> ::unity::Array<crate::system::object::Object> =
199                    ::core::mem::transmute(__vi.method_ptr);
200                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
201                __inner(__receiver, ::core::convert::Into::into(inherit), __mi)
202            }
203        }
204    }
205    #[doc = "`GetCustomAttributes(::unity::SystemType, bool)` overload"]
206    fn get_custom_attributes_2(
207        self,
208        attribute_type: impl ::core::convert::Into<::unity::SystemType>,
209        inherit: impl ::core::convert::Into<bool>,
210    ) -> ::unity::Array<crate::system::object::Object> {
211        unsafe {
212            let __receiver = <FieldBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
213            {
214                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
215                let __vi = *__vt.get(11usize).unwrap_or_else(|| {
216                    panic!(
217                        "unity: virtual slot {}
218 out of range (vtable len {}
219) on the runtime class behind {}
220 (method `{}
221`)",
222                        11usize,
223                        __vt.len(),
224                        <FieldBuilder as ::unity::ClassIdentity>::NAME,
225                        "GetCustomAttributes",
226                    )
227                });
228                let __inner: extern "C" fn(
229                    FieldBuilder,
230                    ::unity::SystemType,
231                    bool,
232                    ::unity::OptionalMethod,
233                ) -> ::unity::Array<crate::system::object::Object> = ::core::mem::transmute(__vi.method_ptr);
234                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
235                __inner(
236                    __receiver,
237                    ::core::convert::Into::into(attribute_type),
238                    ::core::convert::Into::into(inherit),
239                    __mi,
240                )
241            }
242        }
243    }
244    #[doc = "`IsDefined(::unity::SystemType, bool)` overload"]
245    fn is_defined(self, attribute_type: impl ::core::convert::Into<::unity::SystemType>, inherit: impl ::core::convert::Into<bool>) -> bool {
246        unsafe {
247            let __receiver = <FieldBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
248            {
249                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
250                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
251                    panic!(
252                        "unity: virtual slot {}
253 out of range (vtable len {}
254) on the runtime class behind {}
255 (method `{}
256`)",
257                        12usize,
258                        __vt.len(),
259                        <FieldBuilder as ::unity::ClassIdentity>::NAME,
260                        "IsDefined",
261                    )
262                });
263                let __inner: extern "C" fn(FieldBuilder, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
264                    ::core::mem::transmute(__vi.method_ptr);
265                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
266                __inner(
267                    __receiver,
268                    ::core::convert::Into::into(attribute_type),
269                    ::core::convert::Into::into(inherit),
270                    __mi,
271                )
272            }
273        }
274    }
275}
276
277#[cfg(feature = "system-reflection-emit-fieldbuilder")]
278impl<__T: IFieldBuilder> IFieldBuilderMethods for __T {}
279
280#[cfg(feature = "system-reflection-emit-fieldbuilder")]
281impl FieldBuilder {
282    pub fn get_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
283        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
284    }
285
286    pub fn get_declaring_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
287        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
288    }
289
290    pub fn get_field_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
291        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
292    }
293
294    pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
295        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
296    }
297
298    pub fn get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
299        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
300    }
301
302    pub fn get_reflected_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
303        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
304    }
305
306    pub fn get_custom_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
307        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
308    }
309
310    pub fn get_custom_attributes_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
311        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
312    }
313
314    pub fn is_defined_method_info() -> &'static ::unity::il2cpp::MethodInfo {
315        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
316    }
317}
318
319#[cfg(feature = "system-reflection-emit-fieldbuilder")]
320impl FieldBuilder {
321    #[doc = "Direct (non-virtual) call to `FieldBuilder`'s own `get_Attributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
322    pub unsafe fn get_attributes(
323        this: impl ::core::convert::Into<::unity::IlInstance>,
324    ) -> crate::system::reflection::fieldattributes::FieldAttributes {
325        let __mi = Self::get_attributes_method_info();
326        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::fieldattributes::FieldAttributes =
327            ::core::mem::transmute(__mi.method_ptr);
328        __inner(this.into(), ::core::option::Option::None)
329    }
330
331    #[doc = "Direct (non-virtual) call to `FieldBuilder`'s own `get_DeclaringType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
332    pub unsafe fn get_declaring_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
333        let __mi = Self::get_declaring_type_method_info();
334        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
335        __inner(this.into(), ::core::option::Option::None)
336    }
337
338    #[doc = "Direct (non-virtual) call to `FieldBuilder`'s own `get_FieldType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
339    pub unsafe fn get_field_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
340        let __mi = Self::get_field_type_method_info();
341        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
342        __inner(this.into(), ::core::option::Option::None)
343    }
344
345    #[doc = "Direct (non-virtual) call to `FieldBuilder`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
346    pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
347        let __mi = Self::get_name_method_info();
348        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
349        __inner(this.into(), ::core::option::Option::None)
350    }
351
352    #[doc = "Direct (non-virtual) call to `FieldBuilder`'s own `GetValue`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
353    pub unsafe fn get_value(
354        this: impl ::core::convert::Into<::unity::IlInstance>,
355        obj: crate::system::object::Object,
356    ) -> crate::system::object::Object {
357        let __mi = Self::get_value_method_info();
358        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> crate::system::object::Object =
359            ::core::mem::transmute(__mi.method_ptr);
360        __inner(this.into(), obj, ::core::option::Option::None)
361    }
362
363    #[doc = "Direct (non-virtual) call to `FieldBuilder`'s own `get_ReflectedType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
364    pub unsafe fn get_reflected_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
365        let __mi = Self::get_reflected_type_method_info();
366        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
367        __inner(this.into(), ::core::option::Option::None)
368    }
369
370    #[doc = "Direct (non-virtual) call to `FieldBuilder`'s own `GetCustomAttributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
371    pub unsafe fn get_custom_attributes(
372        this: impl ::core::convert::Into<::unity::IlInstance>,
373        inherit: bool,
374    ) -> ::unity::Array<crate::system::object::Object> {
375        let __mi = Self::get_custom_attributes_method_info();
376        let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> ::unity::Array<crate::system::object::Object> =
377            ::core::mem::transmute(__mi.method_ptr);
378        __inner(this.into(), inherit, ::core::option::Option::None)
379    }
380
381    #[doc = "Direct (non-virtual) call to `FieldBuilder`'s own `GetCustomAttributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
382    pub unsafe fn get_custom_attributes_2(
383        this: impl ::core::convert::Into<::unity::IlInstance>,
384        attribute_type: ::unity::SystemType,
385        inherit: bool,
386    ) -> ::unity::Array<crate::system::object::Object> {
387        let __mi = Self::get_custom_attributes_2_method_info();
388        let __inner: extern "C" fn(
389            ::unity::IlInstance,
390            ::unity::SystemType,
391            bool,
392            ::unity::OptionalMethod,
393        ) -> ::unity::Array<crate::system::object::Object> = ::core::mem::transmute(__mi.method_ptr);
394        __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
395    }
396
397    #[doc = "Direct (non-virtual) call to `FieldBuilder`'s own `IsDefined`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
398    pub unsafe fn is_defined(this: impl ::core::convert::Into<::unity::IlInstance>, attribute_type: ::unity::SystemType, inherit: bool) -> bool {
399        let __mi = Self::is_defined_method_info();
400        let __inner: extern "C" fn(::unity::IlInstance, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
401            ::core::mem::transmute(__mi.method_ptr);
402        __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
403    }
404}
405
406#[cfg(feature = "system-reflection-emit-fieldbuilder")]
407#[doc(hidden)]
408pub mod prelude {
409    pub use super::{FieldBuilder, IFieldBuilder, IFieldBuilderMethods};
410    #[cfg(feature = "system-object")]
411    pub use crate::system::object::IObjectMethods;
412    #[cfg(feature = "system-reflection-fieldinfo")]
413    pub use crate::system::reflection::fieldinfo::IFieldInfoMethods;
414    #[cfg(feature = "system-reflection-memberinfo")]
415    pub use crate::system::reflection::memberinfo::IMemberInfoMethods;
416    pub use crate::system::{
417        object::IObject,
418        reflection::{fieldinfo::IFieldInfo, memberinfo::IMemberInfo},
419    };
420}