Skip to main content

engage/generated/app/
procdescmpersistent.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-procdescmpersistent-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::procdesc::{IProcDesc, ProcDesc},
10        system::object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/procdescmpersistent/ProcDescMPersistent.md"))]
14    #[::unity::class(namespace = "App", name = "ProcDescMPersistent")]
15    #[parent(crate::app::procdesc::ProcDesc)]
16    pub struct ProcDescMPersistent {
17        #[offset(24)]
18        #[rename(name = "m_Method")]
19        pub m_method: crate::app::procvoidmethod::ProcVoidMethod,
20    }
21}
22
23#[cfg(feature = "app-procdescmpersistent-types")]
24pub use __types::*;
25
26#[cfg(feature = "app-procdescmpersistent")]
27pub trait IProcDescMPersistentMethods: IProcDescMPersistent {
28    #[doc = "`.ctor(crate::app::procvoidmethod::ProcVoidMethod)` overload"]
29    fn ctor(self, method: impl ::core::convert::Into<crate::app::procvoidmethod::ProcVoidMethod>) -> () {
30        unsafe {
31            let __receiver = <ProcDescMPersistent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
32            ::unity::il2cpp_call!((::unity::module_base()+0x281c0c0usize)as*mut u8,();
33(ProcDescMPersistent)__receiver,(crate::app::procvoidmethod::ProcVoidMethod)::core::convert::Into::into(method))
34        }
35    }
36    #[doc = "`Execute(crate::app::procinst::ProcInst)` overload"]
37    fn execute(self, inst: impl ::core::convert::Into<crate::app::procinst::ProcInst>) -> crate::app::procdesc::ProcDesc_Result {
38        unsafe {
39            let __receiver = <ProcDescMPersistent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
40            {
41                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
42                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
43                    panic!(
44                        "unity: virtual slot {}
45 out of range (vtable len {}
46) on the runtime class behind {}
47 (method `{}
48`)",
49                        4usize,
50                        __vt.len(),
51                        <ProcDescMPersistent as ::unity::ClassIdentity>::NAME,
52                        "Execute",
53                    )
54                });
55                let __inner: extern "C" fn(
56                    ProcDescMPersistent,
57                    crate::app::procinst::ProcInst,
58                    ::unity::OptionalMethod,
59                ) -> crate::app::procdesc::ProcDesc_Result = ::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(inst), __mi)
62            }
63        }
64    }
65}
66
67#[cfg(feature = "app-procdescmpersistent")]
68impl<__T: IProcDescMPersistent> IProcDescMPersistentMethods for __T {}
69
70#[cfg(feature = "app-procdescmpersistent")]
71impl ProcDescMPersistent {
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 execute_method_info() -> &'static ::unity::il2cpp::MethodInfo {
77        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
78    }
79}
80
81#[cfg(feature = "app-procdescmpersistent")]
82impl ProcDescMPersistent {
83    #[doc = "Direct (non-virtual) call to `ProcDescMPersistent`'s own `Execute`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
84    pub unsafe fn execute(
85        this: impl ::core::convert::Into<::unity::IlInstance>,
86        inst: crate::app::procinst::ProcInst,
87    ) -> crate::app::procdesc::ProcDesc_Result {
88        let __mi = Self::execute_method_info();
89        let __inner: extern "C" fn(
90            ::unity::IlInstance,
91            crate::app::procinst::ProcInst,
92            ::unity::OptionalMethod,
93        ) -> crate::app::procdesc::ProcDesc_Result = ::core::mem::transmute(__mi.method_ptr);
94        __inner(this.into(), inst, ::core::option::Option::None)
95    }
96}
97
98#[cfg(feature = "app-procdescmpersistent")]
99impl ProcDescMPersistent {
100    #[doc = "`.ctor(crate::app::procvoidmethod::ProcVoidMethod)` — overload selector"]
101    pub fn new(method: crate::app::procvoidmethod::ProcVoidMethod) -> Self {
102        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
103            panic!(
104                "{}
105::{}
106 failed to instantiate",
107                ::core::stringify!(ProcDescMPersistent),
108                ::core::stringify!(new),
109            )
110        });
111        <Self as IProcDescMPersistentMethods>::ctor(this, method);
112        this
113    }
114}
115
116#[cfg(feature = "app-procdescmpersistent")]
117#[doc(hidden)]
118pub mod prelude {
119    pub use super::{IProcDescMPersistent, IProcDescMPersistentMethods, ProcDescMPersistent};
120    #[cfg(feature = "app-procdesc")]
121    pub use crate::app::procdesc::IProcDescMethods;
122    #[cfg(feature = "system-object")]
123    pub use crate::system::object::IObjectMethods;
124    pub use crate::{app::procdesc::IProcDesc, system::object::IObject};
125}