engage/generated/app/
helpitemcapability.rs1#[cfg(feature = "app-helpitemcapability-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::helpitembase::{HelpItemBase, IHelpItemBase},
10 system::object::{IObject, Object},
11 unity_engine::{
12 behaviour::{Behaviour, IBehaviour},
13 component::{Component, IComponent},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 },
17 };
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/helpitemcapability/HelpItemCapability.md"))]
20 #[::unity::class(namespace = "App", name = "HelpItemCapability")]
21 #[parent(crate::app::helpitembase::HelpItemBase)]
22 pub struct HelpItemCapability {
23 #[offset(80)]
24 #[rename(name = "m_Type")]
25 pub m_type: crate::app::capabilitydefinition::CapabilityDefinition_Type,
26 }
27}
28
29#[cfg(feature = "app-helpitemcapability-types")]
30pub use __types::*;
31
32#[cfg(feature = "app-helpitemcapability")]
33pub trait IHelpItemCapabilityMethods: IHelpItemCapability {
34 #[doc = "`IsValid()` overload"]
35 fn is_valid(self) -> bool {
36 unsafe {
37 let __receiver = <HelpItemCapability as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
38 {
39 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
40 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
41 panic!(
42 "unity: virtual slot {}
43 out of range (vtable len {}
44) on the runtime class behind {}
45 (method `{}
46`)",
47 7usize,
48 __vt.len(),
49 <HelpItemCapability as ::unity::ClassIdentity>::NAME,
50 "IsValid",
51 )
52 });
53 let __inner: extern "C" fn(HelpItemCapability, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
54 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
55 __inner(__receiver, __mi)
56 }
57 }
58 }
59 #[doc = "`SetContents(crate::app::helpparamsetter::HelpParamSetter)` overload"]
60 fn set_contents(self, setter: impl ::core::convert::Into<crate::app::helpparamsetter::HelpParamSetter>) -> () {
61 unsafe {
62 let __receiver = <HelpItemCapability as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
63 {
64 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
65 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
66 panic!(
67 "unity: virtual slot {}
68 out of range (vtable len {}
69) on the runtime class behind {}
70 (method `{}
71`)",
72 6usize,
73 __vt.len(),
74 <HelpItemCapability as ::unity::ClassIdentity>::NAME,
75 "SetContents",
76 )
77 });
78 let __inner: extern "C" fn(HelpItemCapability, crate::app::helpparamsetter::HelpParamSetter, ::unity::OptionalMethod) -> () =
79 ::core::mem::transmute(__vi.method_ptr);
80 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
81 __inner(__receiver, ::core::convert::Into::into(setter), __mi)
82 }
83 }
84 }
85 #[doc = "`.ctor()` overload"]
86 fn ctor(self) -> () {
87 unsafe {
88 let __receiver = <HelpItemCapability as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
89 ::unity::il2cpp_call!((::unity::module_base()+0x297c7f0usize)as*mut u8,();
90(HelpItemCapability)__receiver)
91 }
92 }
93}
94
95#[cfg(feature = "app-helpitemcapability")]
96impl<__T: IHelpItemCapability> IHelpItemCapabilityMethods for __T {}
97
98#[cfg(feature = "app-helpitemcapability")]
99impl HelpItemCapability {
100 pub fn is_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
101 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
102 }
103
104 pub fn set_contents_method_info() -> &'static ::unity::il2cpp::MethodInfo {
105 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
106 }
107
108 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
109 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
110 }
111}
112
113#[cfg(feature = "app-helpitemcapability")]
114impl HelpItemCapability {
115 #[doc = "Direct (non-virtual) call to `HelpItemCapability`'s own `IsValid`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
116 pub unsafe fn is_valid(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
117 let __mi = Self::is_valid_method_info();
118 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
119 __inner(this.into(), ::core::option::Option::None)
120 }
121
122 #[doc = "Direct (non-virtual) call to `HelpItemCapability`'s own `SetContents`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
123 pub unsafe fn set_contents(this: impl ::core::convert::Into<::unity::IlInstance>, setter: crate::app::helpparamsetter::HelpParamSetter) -> () {
124 let __mi = Self::set_contents_method_info();
125 let __inner: extern "C" fn(::unity::IlInstance, crate::app::helpparamsetter::HelpParamSetter, ::unity::OptionalMethod) -> () =
126 ::core::mem::transmute(__mi.method_ptr);
127 __inner(this.into(), setter, ::core::option::Option::None)
128 }
129}
130
131#[cfg(feature = "app-helpitemcapability")]
132impl HelpItemCapability {
133 #[doc = "`.ctor()` — no args"]
134 pub fn new() -> Self {
135 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
136 panic!(
137 "{}
138::{}
139 failed to instantiate",
140 ::core::stringify!(HelpItemCapability),
141 ::core::stringify!(new),
142 )
143 });
144 <Self as IHelpItemCapabilityMethods>::ctor(this);
145 this
146 }
147}
148
149#[cfg(feature = "app-helpitemcapability")]
150#[doc(hidden)]
151pub mod prelude {
152 pub use super::{HelpItemCapability, IHelpItemCapability, IHelpItemCapabilityMethods};
153 #[cfg(feature = "app-helpitembase")]
154 pub use crate::app::helpitembase::IHelpItemBaseMethods;
155 #[cfg(feature = "system-object")]
156 pub use crate::system::object::IObjectMethods;
157 #[cfg(feature = "unity_engine-behaviour")]
158 pub use crate::unity_engine::behaviour::IBehaviourMethods;
159 #[cfg(feature = "unity_engine-component")]
160 pub use crate::unity_engine::component::IComponentMethods;
161 #[cfg(feature = "unity_engine-monobehaviour")]
162 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
163 #[cfg(feature = "unity_engine-object_2")]
164 pub use crate::unity_engine::object_2::IObject_2Methods;
165 pub use crate::{
166 app::helpitembase::IHelpItemBase,
167 system::object::IObject,
168 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
169 };
170}