engage/generated/unity_engine/internal/
defaultvalueattribute.rs1#[cfg(feature = "unity_engine-internal-defaultvalueattribute-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/internal/defaultvalueattribute/DefaultValueAttribute.md"))]
10 #[::unity::class(namespace = "UnityEngine.Internal", name = "DefaultValueAttribute")]
11 pub struct DefaultValueAttribute {
12 #[offset(16)]
13 #[rename(name = "DefaultValue")]
14 pub default_value: ::unity::IlInstance,
15 }
16}
17
18#[cfg(feature = "unity_engine-internal-defaultvalueattribute-types")]
19pub use __types::*;
20
21#[cfg(feature = "unity_engine-internal-defaultvalueattribute")]
22pub trait IDefaultValueAttributeMethods: IDefaultValueAttribute {
23 #[doc = "`.ctor(::unity::Il2CppString)` overload"]
24 fn ctor(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
25 unsafe {
26 let __receiver = <DefaultValueAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
27 ::unity::il2cpp_call!((::unity::module_base()+0x2c4bec0usize)as*mut u8,();
28(DefaultValueAttribute)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
29 }
30 }
31 #[doc = "`get_Value()` overload"]
32 fn get_value(self) -> crate::system::object::Object {
33 unsafe {
34 let __receiver = <DefaultValueAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35 ::unity::il2cpp_call!((::unity::module_base()+0x2c4bf00usize)as*mut u8,crate::system::object::Object;
36(DefaultValueAttribute)__receiver)
37 }
38 }
39 #[doc = "`Equals(crate::system::object::Object)` overload"]
40 fn equals(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
41 unsafe {
42 let __receiver = <DefaultValueAttribute 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(0usize).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 0usize,
53 __vt.len(),
54 <DefaultValueAttribute as ::unity::ClassIdentity>::NAME,
55 "Equals",
56 )
57 });
58 let __inner: extern "C" fn(DefaultValueAttribute, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
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, ::core::convert::Into::into(obj), __mi)
62 }
63 }
64 }
65 #[doc = "`GetHashCode()` overload"]
66 fn get_hash_code(self) -> i32 {
67 unsafe {
68 let __receiver = <DefaultValueAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
69 {
70 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
71 let __vi = *__vt.get(2usize).unwrap_or_else(|| {
72 panic!(
73 "unity: virtual slot {}
74 out of range (vtable len {}
75) on the runtime class behind {}
76 (method `{}
77`)",
78 2usize,
79 __vt.len(),
80 <DefaultValueAttribute as ::unity::ClassIdentity>::NAME,
81 "GetHashCode",
82 )
83 });
84 let __inner: extern "C" fn(DefaultValueAttribute, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
85 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
86 __inner(__receiver, __mi)
87 }
88 }
89 }
90}
91
92#[cfg(feature = "unity_engine-internal-defaultvalueattribute")]
93impl<__T: IDefaultValueAttribute> IDefaultValueAttributeMethods for __T {}
94
95#[cfg(feature = "unity_engine-internal-defaultvalueattribute")]
96impl DefaultValueAttribute {
97 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
98 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
99 }
100
101 pub fn get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
102 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
103 }
104
105 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
106 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
107 }
108
109 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
110 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
111 }
112}
113
114#[cfg(feature = "unity_engine-internal-defaultvalueattribute")]
115impl DefaultValueAttribute {
116 #[doc = "Direct (non-virtual) call to `DefaultValueAttribute`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
117 pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
118 let __mi = Self::equals_method_info();
119 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
120 ::core::mem::transmute(__mi.method_ptr);
121 __inner(this.into(), obj, ::core::option::Option::None)
122 }
123
124 #[doc = "Direct (non-virtual) call to `DefaultValueAttribute`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
125 pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
126 let __mi = Self::get_hash_code_method_info();
127 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
128 __inner(this.into(), ::core::option::Option::None)
129 }
130}
131
132#[cfg(feature = "unity_engine-internal-defaultvalueattribute")]
133impl DefaultValueAttribute {
134 #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
135 pub fn new(value: ::unity::Il2CppString) -> Self {
136 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
137 panic!(
138 "{}
139::{}
140 failed to instantiate",
141 ::core::stringify!(DefaultValueAttribute),
142 ::core::stringify!(new),
143 )
144 });
145 <Self as IDefaultValueAttributeMethods>::ctor(this, value);
146 this
147 }
148}
149
150#[cfg(feature = "unity_engine-internal-defaultvalueattribute")]
151#[doc(hidden)]
152pub mod prelude {
153 pub use super::{DefaultValueAttribute, IDefaultValueAttribute, IDefaultValueAttributeMethods};
154}