Skip to main content

engage/generated/unity_engine/resource_management/async_operations/
icachable.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-resource_management-async_operations-icachable-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/resource_management/async_operations/icachable/ICachable.md"))]
10    #[::unity::class(namespace = "UnityEngine.ResourceManagement.AsyncOperations", name = "ICachable")]
11    pub struct ICachable {}
12}
13
14#[cfg(feature = "unity_engine-resource_management-async_operations-icachable-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-resource_management-async_operations-icachable")]
18pub trait IICachableMethods: IICachable {
19    #[doc = "`get_Key()` overload"]
20    fn get_key(self) -> crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey {
21        unsafe {
22            let __receiver = <ICachable 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(0usize).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                        0usize,
33                        __vt.len(),
34                        <ICachable as ::unity::ClassIdentity>::NAME,
35                        "get_Key",
36                    )
37                });
38                let __inner: extern "C" fn(
39                    ICachable,
40                    ::unity::OptionalMethod,
41                )
42                    -> crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey =
43                    ::core::mem::transmute(__vi.method_ptr);
44                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
45                __inner(__receiver, __mi)
46            }
47        }
48    }
49    #[doc = "`set_Key(crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey)` overload"]
50    fn set_key(
51        self,
52        value: impl ::core::convert::Into<crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey>,
53    ) -> () {
54        unsafe {
55            let __receiver = <ICachable as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56            {
57                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
58                let __vi = *__vt.get(1usize).unwrap_or_else(|| {
59                    panic!(
60                        "unity: virtual slot {}
61 out of range (vtable len {}
62) on the runtime class behind {}
63 (method `{}
64`)",
65                        1usize,
66                        __vt.len(),
67                        <ICachable as ::unity::ClassIdentity>::NAME,
68                        "set_Key",
69                    )
70                });
71                let __inner: extern "C" fn(
72                    ICachable,
73                    crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey,
74                    ::unity::OptionalMethod,
75                ) -> () = ::core::mem::transmute(__vi.method_ptr);
76                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
77                __inner(__receiver, ::core::convert::Into::into(value), __mi)
78            }
79        }
80    }
81}
82
83#[cfg(feature = "unity_engine-resource_management-async_operations-icachable")]
84impl<__T: IICachable> IICachableMethods for __T {}
85
86#[cfg(feature = "unity_engine-resource_management-async_operations-icachable")]
87impl ICachable {
88    pub fn get_key_method_info() -> &'static ::unity::il2cpp::MethodInfo {
89        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
90    }
91
92    pub fn set_key_method_info() -> &'static ::unity::il2cpp::MethodInfo {
93        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
94    }
95}
96
97#[cfg(feature = "unity_engine-resource_management-async_operations-icachable")]
98impl ICachable {
99    #[doc = "Direct (non-virtual) call to `ICachable`'s own `get_Key`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
100    pub unsafe fn get_key(
101        this: impl ::core::convert::Into<::unity::IlInstance>,
102    ) -> crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey {
103        let __mi = Self::get_key_method_info();
104        let __inner: extern "C" fn(
105            ::unity::IlInstance,
106            ::unity::OptionalMethod,
107        ) -> crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey = ::core::mem::transmute(__mi.method_ptr);
108        __inner(this.into(), ::core::option::Option::None)
109    }
110
111    #[doc = "Direct (non-virtual) call to `ICachable`'s own `set_Key`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
112    pub unsafe fn set_key(
113        this: impl ::core::convert::Into<::unity::IlInstance>,
114        value: crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey,
115    ) -> () {
116        let __mi = Self::set_key_method_info();
117        let __inner: extern "C" fn(
118            ::unity::IlInstance,
119            crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey,
120            ::unity::OptionalMethod,
121        ) -> () = ::core::mem::transmute(__mi.method_ptr);
122        __inner(this.into(), value, ::core::option::Option::None)
123    }
124}
125
126#[cfg(feature = "unity_engine-resource_management-async_operations-icachable")]
127#[doc(hidden)]
128pub mod prelude {
129    pub use super::{ICachable, IICachable, IICachableMethods};
130}