Skip to main content

engage/generated/unity_engine/bindings/
nativemethodattribute.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-bindings-nativemethodattribute-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8
9    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/bindings/nativemethodattribute/NativeMethodAttribute.md"))]
10    #[::unity::class(namespace = "UnityEngine.Bindings", name = "NativeMethodAttribute")]
11    pub struct NativeMethodAttribute {}
12}
13
14#[cfg(feature = "unity_engine-bindings-nativemethodattribute-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-bindings-nativemethodattribute")]
18pub trait INativeMethodAttributeMethods: INativeMethodAttribute {
19    #[doc = "`set_Name(::unity::Il2CppString)` overload"]
20    fn set_name(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
21        unsafe {
22            let __receiver = <NativeMethodAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
23            {
24                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
25                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
26                    panic!(
27                        "unity: virtual slot {}
28 out of range (vtable len {}
29) on the runtime class behind {}
30 (method `{}
31`)",
32                        4usize,
33                        __vt.len(),
34                        <NativeMethodAttribute as ::unity::ClassIdentity>::NAME,
35                        "set_Name",
36                    )
37                });
38                let __inner: extern "C" fn(NativeMethodAttribute, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
39                    ::core::mem::transmute(__vi.method_ptr);
40                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
41                __inner(__receiver, ::core::convert::Into::into(value), __mi)
42            }
43        }
44    }
45    #[doc = "`set_IsThreadSafe(bool)` overload"]
46    fn set_is_thread_safe(self, value: impl ::core::convert::Into<bool>) -> () {
47        unsafe {
48            let __receiver = <NativeMethodAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
49            {
50                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
51                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
52                    panic!(
53                        "unity: virtual slot {}
54 out of range (vtable len {}
55) on the runtime class behind {}
56 (method `{}
57`)",
58                        5usize,
59                        __vt.len(),
60                        <NativeMethodAttribute as ::unity::ClassIdentity>::NAME,
61                        "set_IsThreadSafe",
62                    )
63                });
64                let __inner: extern "C" fn(NativeMethodAttribute, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
65                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
66                __inner(__receiver, ::core::convert::Into::into(value), __mi)
67            }
68        }
69    }
70    #[doc = "`set_IsFreeFunction(bool)` overload"]
71    fn set_is_free_function(self, value: impl ::core::convert::Into<bool>) -> () {
72        unsafe {
73            let __receiver = <NativeMethodAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
74            {
75                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
76                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
77                    panic!(
78                        "unity: virtual slot {}
79 out of range (vtable len {}
80) on the runtime class behind {}
81 (method `{}
82`)",
83                        6usize,
84                        __vt.len(),
85                        <NativeMethodAttribute as ::unity::ClassIdentity>::NAME,
86                        "set_IsFreeFunction",
87                    )
88                });
89                let __inner: extern "C" fn(NativeMethodAttribute, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
90                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
91                __inner(__receiver, ::core::convert::Into::into(value), __mi)
92            }
93        }
94    }
95    #[doc = "`set_ThrowsException(bool)` overload"]
96    fn set_throws_exception(self, value: impl ::core::convert::Into<bool>) -> () {
97        unsafe {
98            let __receiver = <NativeMethodAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
99            {
100                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
101                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
102                    panic!(
103                        "unity: virtual slot {}
104 out of range (vtable len {}
105) on the runtime class behind {}
106 (method `{}
107`)",
108                        7usize,
109                        __vt.len(),
110                        <NativeMethodAttribute as ::unity::ClassIdentity>::NAME,
111                        "set_ThrowsException",
112                    )
113                });
114                let __inner: extern "C" fn(NativeMethodAttribute, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
115                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
116                __inner(__receiver, ::core::convert::Into::into(value), __mi)
117            }
118        }
119    }
120    #[doc = "`set_HasExplicitThis(bool)` overload"]
121    fn set_has_explicit_this(self, value: impl ::core::convert::Into<bool>) -> () {
122        unsafe {
123            let __receiver = <NativeMethodAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
124            {
125                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
126                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
127                    panic!(
128                        "unity: virtual slot {}
129 out of range (vtable len {}
130) on the runtime class behind {}
131 (method `{}
132`)",
133                        8usize,
134                        __vt.len(),
135                        <NativeMethodAttribute as ::unity::ClassIdentity>::NAME,
136                        "set_HasExplicitThis",
137                    )
138                });
139                let __inner: extern "C" fn(NativeMethodAttribute, bool, ::unity::OptionalMethod) -> () = ::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(value), __mi)
142            }
143        }
144    }
145    #[doc = "`.ctor()` overload"]
146    fn ctor(self) -> () {
147        unsafe {
148            let __receiver = <NativeMethodAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
149            ::unity::il2cpp_call!((::unity::module_base()+0x3f37b30usize)as*mut u8,();
150(NativeMethodAttribute)__receiver)
151        }
152    }
153    #[doc = "`.ctor(::unity::Il2CppString)` overload"]
154    fn ctor_2(self, name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
155        unsafe {
156            let __receiver = <NativeMethodAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
157            ::unity::il2cpp_call!((::unity::module_base()+0x3f37f90usize)as*mut u8,();
158(NativeMethodAttribute)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name))
159        }
160    }
161    #[doc = "`.ctor(::unity::Il2CppString, bool)` overload"]
162    fn ctor_3(self, name: impl ::core::convert::Into<::unity::Il2CppString>, is_free_function: impl ::core::convert::Into<bool>) -> () {
163        unsafe {
164            let __receiver = <NativeMethodAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
165            ::unity::il2cpp_call!((::unity::module_base()+0x3f37b70usize)as*mut u8,();
166(NativeMethodAttribute)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(bool)::core::convert::Into::into(is_free_function))
167        }
168    }
169    #[doc = "`.ctor(::unity::Il2CppString, bool, bool)` overload"]
170    fn ctor_4(
171        self,
172        name: impl ::core::convert::Into<::unity::Il2CppString>,
173        is_free_function: impl ::core::convert::Into<bool>,
174        is_thread_safe: impl ::core::convert::Into<bool>,
175    ) -> () {
176        unsafe {
177            let __receiver = <NativeMethodAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
178            ::unity::il2cpp_call!((::unity::module_base()+0x3f37be0usize)as*mut u8,();
179(NativeMethodAttribute)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(bool)::core::convert::Into::into(is_free_function),(bool)::core::convert::Into::into(is_thread_safe))
180        }
181    }
182}
183
184#[cfg(feature = "unity_engine-bindings-nativemethodattribute")]
185impl<__T: INativeMethodAttribute> INativeMethodAttributeMethods for __T {}
186
187#[cfg(feature = "unity_engine-bindings-nativemethodattribute")]
188impl NativeMethodAttribute {
189    pub fn set_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
190        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
191    }
192
193    pub fn set_is_thread_safe_method_info() -> &'static ::unity::il2cpp::MethodInfo {
194        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
195    }
196
197    pub fn set_is_free_function_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
199    }
200
201    pub fn set_throws_exception_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
203    }
204
205    pub fn set_has_explicit_this_method_info() -> &'static ::unity::il2cpp::MethodInfo {
206        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
207    }
208
209    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
211    }
212
213    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
214        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
215    }
216
217    pub fn ctor_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
218        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
219    }
220
221    pub fn ctor_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
222        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
223    }
224}
225
226#[cfg(feature = "unity_engine-bindings-nativemethodattribute")]
227impl NativeMethodAttribute {
228    #[doc = "Direct (non-virtual) call to `NativeMethodAttribute`'s own `set_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
229    pub unsafe fn set_name(this: impl ::core::convert::Into<::unity::IlInstance>, value: ::unity::Il2CppString) -> () {
230        let __mi = Self::set_name_method_info();
231        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
232            ::core::mem::transmute(__mi.method_ptr);
233        __inner(this.into(), value, ::core::option::Option::None)
234    }
235
236    #[doc = "Direct (non-virtual) call to `NativeMethodAttribute`'s own `set_IsThreadSafe`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
237    pub unsafe fn set_is_thread_safe(this: impl ::core::convert::Into<::unity::IlInstance>, value: bool) -> () {
238        let __mi = Self::set_is_thread_safe_method_info();
239        let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
240        __inner(this.into(), value, ::core::option::Option::None)
241    }
242
243    #[doc = "Direct (non-virtual) call to `NativeMethodAttribute`'s own `set_IsFreeFunction`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
244    pub unsafe fn set_is_free_function(this: impl ::core::convert::Into<::unity::IlInstance>, value: bool) -> () {
245        let __mi = Self::set_is_free_function_method_info();
246        let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
247        __inner(this.into(), value, ::core::option::Option::None)
248    }
249
250    #[doc = "Direct (non-virtual) call to `NativeMethodAttribute`'s own `set_ThrowsException`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
251    pub unsafe fn set_throws_exception(this: impl ::core::convert::Into<::unity::IlInstance>, value: bool) -> () {
252        let __mi = Self::set_throws_exception_method_info();
253        let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
254        __inner(this.into(), value, ::core::option::Option::None)
255    }
256
257    #[doc = "Direct (non-virtual) call to `NativeMethodAttribute`'s own `set_HasExplicitThis`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
258    pub unsafe fn set_has_explicit_this(this: impl ::core::convert::Into<::unity::IlInstance>, value: bool) -> () {
259        let __mi = Self::set_has_explicit_this_method_info();
260        let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
261        __inner(this.into(), value, ::core::option::Option::None)
262    }
263}
264
265#[cfg(feature = "unity_engine-bindings-nativemethodattribute")]
266impl NativeMethodAttribute {
267    #[doc = "`.ctor()` — no args"]
268    pub fn new() -> Self {
269        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
270            panic!(
271                "{}
272::{}
273 failed to instantiate",
274                ::core::stringify!(NativeMethodAttribute),
275                ::core::stringify!(new),
276            )
277        });
278        <Self as INativeMethodAttributeMethods>::ctor(this);
279        this
280    }
281
282    #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
283    pub fn new_2(name: ::unity::Il2CppString) -> Self {
284        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
285            panic!(
286                "{}
287::{}
288 failed to instantiate",
289                ::core::stringify!(NativeMethodAttribute),
290                ::core::stringify!(new_2),
291            )
292        });
293        <Self as INativeMethodAttributeMethods>::ctor_2(this, name);
294        this
295    }
296
297    #[doc = "`.ctor(::unity::Il2CppString, bool)` — overload selector"]
298    pub fn new_3(name: ::unity::Il2CppString, is_free_function: bool) -> Self {
299        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
300            panic!(
301                "{}
302::{}
303 failed to instantiate",
304                ::core::stringify!(NativeMethodAttribute),
305                ::core::stringify!(new_3),
306            )
307        });
308        <Self as INativeMethodAttributeMethods>::ctor_3(this, name, is_free_function);
309        this
310    }
311
312    #[doc = "`.ctor(::unity::Il2CppString, bool, bool)` — overload selector"]
313    pub fn new_4(name: ::unity::Il2CppString, is_free_function: bool, is_thread_safe: bool) -> Self {
314        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
315            panic!(
316                "{}
317::{}
318 failed to instantiate",
319                ::core::stringify!(NativeMethodAttribute),
320                ::core::stringify!(new_4),
321            )
322        });
323        <Self as INativeMethodAttributeMethods>::ctor_4(this, name, is_free_function, is_thread_safe);
324        this
325    }
326}
327
328#[cfg(feature = "unity_engine-bindings-nativemethodattribute")]
329#[doc(hidden)]
330pub mod prelude {
331    pub use super::{INativeMethodAttribute, INativeMethodAttributeMethods, NativeMethodAttribute};
332}