Skip to main content

engage/generated/system/reflection/
localvariableinfo.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-reflection-localvariableinfo-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/system/reflection/localvariableinfo/LocalVariableInfo.md"))]
11    #[::unity::class(namespace = "System.Reflection", name = "LocalVariableInfo")]
12    #[parent(crate::system::object::Object)]
13    pub struct LocalVariableInfo {
14        #[offset(16)]
15        #[rename(name = "type")]
16        pub r#type: ::unity::SystemType,
17        #[offset(24)]
18        #[rename(name = "is_pinned")]
19        pub is_pinned: bool,
20        #[offset(26)]
21        #[rename(name = "position")]
22        pub position: u16,
23    }
24}
25
26#[cfg(feature = "system-reflection-localvariableinfo-types")]
27pub use __types::*;
28
29#[cfg(feature = "system-reflection-localvariableinfo")]
30pub trait ILocalVariableInfoMethods: ILocalVariableInfo {
31    #[doc = "`.ctor()` overload"]
32    fn ctor(self) -> () {
33        unsafe {
34            let __receiver = <LocalVariableInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35            ::unity::il2cpp_call!((::unity::module_base()+0x3270da0usize)as*mut u8,();
36(LocalVariableInfo)__receiver)
37        }
38    }
39    #[doc = "`ToString()` overload"]
40    fn to_string(self) -> ::unity::Il2CppString {
41        unsafe {
42            let __receiver = <LocalVariableInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
43            {
44                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
45                let __vi = *__vt.get(3usize).unwrap_or_else(|| {
46                    panic!(
47                        "unity: virtual slot {}
48 out of range (vtable len {}
49) on the runtime class behind {}
50 (method `{}
51`)",
52                        3usize,
53                        __vt.len(),
54                        <LocalVariableInfo as ::unity::ClassIdentity>::NAME,
55                        "ToString",
56                    )
57                });
58                let __inner: extern "C" fn(LocalVariableInfo, ::unity::OptionalMethod) -> ::unity::Il2CppString =
59                    ::core::mem::transmute(__vi.method_ptr);
60                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
61                __inner(__receiver, __mi)
62            }
63        }
64    }
65}
66
67#[cfg(feature = "system-reflection-localvariableinfo")]
68impl<__T: ILocalVariableInfo> ILocalVariableInfoMethods for __T {}
69
70#[cfg(feature = "system-reflection-localvariableinfo")]
71impl LocalVariableInfo {
72    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
73        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
74    }
75
76    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
77        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
78    }
79}
80
81#[cfg(feature = "system-reflection-localvariableinfo")]
82impl LocalVariableInfo {
83    #[doc = "Direct (non-virtual) call to `LocalVariableInfo`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
84    pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
85        let __mi = Self::to_string_method_info();
86        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
87        __inner(this.into(), ::core::option::Option::None)
88    }
89}
90
91#[cfg(feature = "system-reflection-localvariableinfo")]
92impl LocalVariableInfo {
93    #[doc = "`.ctor()` — no args"]
94    pub fn new() -> Self {
95        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
96            panic!(
97                "{}
98::{}
99 failed to instantiate",
100                ::core::stringify!(LocalVariableInfo),
101                ::core::stringify!(new),
102            )
103        });
104        <Self as ILocalVariableInfoMethods>::ctor(this);
105        this
106    }
107}
108
109#[cfg(feature = "system-reflection-localvariableinfo")]
110#[doc(hidden)]
111pub mod prelude {
112    pub use super::{ILocalVariableInfo, ILocalVariableInfoMethods, LocalVariableInfo};
113    pub use crate::system::object::IObject;
114    #[cfg(feature = "system-object")]
115    pub use crate::system::object::IObjectMethods;
116}