Skip to main content

engage/generated/unity_engine/bindings/
nativeheaderattribute.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-bindings-nativeheaderattribute-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/nativeheaderattribute/NativeHeaderAttribute.md"))]
10    #[::unity::class(namespace = "UnityEngine.Bindings", name = "NativeHeaderAttribute")]
11    pub struct NativeHeaderAttribute {}
12}
13
14#[cfg(feature = "unity_engine-bindings-nativeheaderattribute-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-bindings-nativeheaderattribute")]
18pub trait INativeHeaderAttributeMethods: INativeHeaderAttribute {
19    #[doc = "`set_Header(::unity::Il2CppString)` overload"]
20    fn set_header(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
21        unsafe {
22            let __receiver = <NativeHeaderAttribute 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                        <NativeHeaderAttribute as ::unity::ClassIdentity>::NAME,
35                        "set_Header",
36                    )
37                });
38                let __inner: extern "C" fn(NativeHeaderAttribute, ::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 = "`.ctor(::unity::Il2CppString)` overload"]
46    fn ctor(self, header: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
47        unsafe {
48            let __receiver = <NativeHeaderAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
49            ::unity::il2cpp_call!((::unity::module_base()+0x3f37e30usize)as*mut u8,();
50(NativeHeaderAttribute)__receiver,(::unity::Il2CppString)::core::convert::Into::into(header))
51        }
52    }
53}
54
55#[cfg(feature = "unity_engine-bindings-nativeheaderattribute")]
56impl<__T: INativeHeaderAttribute> INativeHeaderAttributeMethods for __T {}
57
58#[cfg(feature = "unity_engine-bindings-nativeheaderattribute")]
59impl NativeHeaderAttribute {
60    pub fn set_header_method_info() -> &'static ::unity::il2cpp::MethodInfo {
61        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
62    }
63
64    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
65        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
66    }
67}
68
69#[cfg(feature = "unity_engine-bindings-nativeheaderattribute")]
70impl NativeHeaderAttribute {
71    #[doc = "Direct (non-virtual) call to `NativeHeaderAttribute`'s own `set_Header`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
72    pub unsafe fn set_header(this: impl ::core::convert::Into<::unity::IlInstance>, value: ::unity::Il2CppString) -> () {
73        let __mi = Self::set_header_method_info();
74        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
75            ::core::mem::transmute(__mi.method_ptr);
76        __inner(this.into(), value, ::core::option::Option::None)
77    }
78}
79
80#[cfg(feature = "unity_engine-bindings-nativeheaderattribute")]
81impl NativeHeaderAttribute {
82    #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
83    pub fn new(header: ::unity::Il2CppString) -> Self {
84        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
85            panic!(
86                "{}
87::{}
88 failed to instantiate",
89                ::core::stringify!(NativeHeaderAttribute),
90                ::core::stringify!(new),
91            )
92        });
93        <Self as INativeHeaderAttributeMethods>::ctor(this, header);
94        this
95    }
96}
97
98#[cfg(feature = "unity_engine-bindings-nativeheaderattribute")]
99#[doc(hidden)]
100pub mod prelude {
101    pub use super::{INativeHeaderAttribute, INativeHeaderAttributeMethods, NativeHeaderAttribute};
102}