Skip to main content

engage/generated/unity_engine/resource_management/util/
locationcachekey.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-resource_management-util-locationcachekey-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/resource_management/util/locationcachekey/LocationCacheKey.md"))]
11    #[::unity::class(namespace = "UnityEngine.ResourceManagement.Util", name = "LocationCacheKey")]
12    #[parent(crate::system::object::Object)]
13    pub struct LocationCacheKey {
14        #[offset(16)]
15        #[rename(name = "m_Location")]
16        pub m_location: crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
17        #[offset(24)]
18        #[rename(name = "m_DesiredType")]
19        pub m_desired_type: ::unity::SystemType,
20    }
21}
22
23#[cfg(feature = "unity_engine-resource_management-util-locationcachekey-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-resource_management-util-locationcachekey")]
27#[doc(hidden)]
28#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
29mod __LocationCacheKey_unity_raw {
30    use super::*;
31    #[doc(hidden)]
32    #[allow(non_snake_case)]
33    pub mod __lookup_ctor {
34        use super::*;
35        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
36            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
37                <crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation as ::unity::IlType>::il_type(),
38                <::unity::SystemType as ::unity::IlType>::il_type(),
39            ];
40            ::unity::lookup::method_info_on_class_with_signature(
41                <LocationCacheKey as ::unity::ClassIdentity>::class(),
42                ".ctor",
43                2,
44                param_types,
45                false,
46            )
47        });
48        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
49            match &*METHOD {
50                ::core::result::Result::Ok(mi) => *mi,
51                ::core::result::Result::Err(e) => {
52                    panic!(
53                        "method lookup failed: {}
54::{}
55: {}
56",
57                        <LocationCacheKey as ::unity::ClassIdentity>::NAME,
58                        ".ctor",
59                        e
60                    )
61                },
62            }
63        }
64    }
65    #[doc(hidden)]
66    #[allow(non_snake_case)]
67    pub mod __lookup_equals_3 {
68        use super::*;
69        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
70            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
71                &[<crate::unity_engine::resource_management::util::locationcachekey::LocationCacheKey as ::unity::IlType>::il_type()];
72            ::unity::lookup::method_info_on_class_with_signature(
73                <LocationCacheKey as ::unity::ClassIdentity>::class(),
74                "Equals",
75                1,
76                param_types,
77                false,
78            )
79        });
80        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
81            match &*METHOD {
82                ::core::result::Result::Ok(mi) => *mi,
83                ::core::result::Result::Err(e) => {
84                    panic!(
85                        "method lookup failed: {}
86::{}
87: {}
88",
89                        <LocationCacheKey as ::unity::ClassIdentity>::NAME,
90                        "Equals",
91                        e
92                    )
93                },
94            }
95        }
96    }
97}
98
99#[cfg(feature = "unity_engine-resource_management-util-locationcachekey")]
100pub trait ILocationCacheKeyMethods: ILocationCacheKey {
101    #[doc = "`.ctor(crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation, ::unity::SystemType)` overload"]
102    fn ctor(
103        self,
104        location: impl ::core::convert::Into<crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation>,
105        desired_type: impl ::core::convert::Into<::unity::SystemType>,
106    ) -> () {
107        unsafe {
108            let __receiver = <LocationCacheKey as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
109            ::unity::il2cpp_call!(__LocationCacheKey_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
110(LocationCacheKey)__receiver,(crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation)::core::convert::Into::into(location),(::unity::SystemType)::core::convert::Into::into(desired_type))
111        }
112    }
113    #[doc = "`GetHashCode()` overload"]
114    fn get_hash_code(self) -> i32 {
115        unsafe {
116            let __receiver = <LocationCacheKey as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
117            {
118                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
119                let __vi = *__vt.get(2usize).unwrap_or_else(|| {
120                    panic!(
121                        "unity: virtual slot {}
122 out of range (vtable len {}
123) on the runtime class behind {}
124 (method `{}
125`)",
126                        2usize,
127                        __vt.len(),
128                        <LocationCacheKey as ::unity::ClassIdentity>::NAME,
129                        "GetHashCode",
130                    )
131                });
132                let __inner: extern "C" fn(LocationCacheKey, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
133                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
134                __inner(__receiver, __mi)
135            }
136        }
137    }
138    #[doc = "`Equals(crate::system::object::Object)` overload"]
139    fn equals(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
140        unsafe {
141            let __receiver = <LocationCacheKey as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
142            {
143                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
144                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
145                    panic!(
146                        "unity: virtual slot {}
147 out of range (vtable len {}
148) on the runtime class behind {}
149 (method `{}
150`)",
151                        0usize,
152                        __vt.len(),
153                        <LocationCacheKey as ::unity::ClassIdentity>::NAME,
154                        "Equals",
155                    )
156                });
157                let __inner: extern "C" fn(LocationCacheKey, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
158                    ::core::mem::transmute(__vi.method_ptr);
159                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
160                __inner(__receiver, ::core::convert::Into::into(obj), __mi)
161            }
162        }
163    }
164    #[doc = "`Equals(crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey)` overload"]
165    fn equals_2(
166        self,
167        other: impl ::core::convert::Into<crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey>,
168    ) -> bool {
169        unsafe {
170            let __receiver = <LocationCacheKey as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
171            {
172                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
173                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
174                    panic!(
175                        "unity: virtual slot {}
176 out of range (vtable len {}
177) on the runtime class behind {}
178 (method `{}
179`)",
180                        4usize,
181                        __vt.len(),
182                        <LocationCacheKey as ::unity::ClassIdentity>::NAME,
183                        "Equals",
184                    )
185                });
186                let __inner: extern "C" fn(
187                    LocationCacheKey,
188                    crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey,
189                    ::unity::OptionalMethod,
190                ) -> bool = ::core::mem::transmute(__vi.method_ptr);
191                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
192                __inner(__receiver, ::core::convert::Into::into(other), __mi)
193            }
194        }
195    }
196    #[doc = "`Equals(crate::unity_engine::resource_management::util::locationcachekey::LocationCacheKey)` overload"]
197    fn equals_3(self, other: impl ::core::convert::Into<crate::unity_engine::resource_management::util::locationcachekey::LocationCacheKey>) -> bool {
198        unsafe {
199            let __receiver = <LocationCacheKey as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
200            ::unity::il2cpp_call!(__LocationCacheKey_unity_raw::__lookup_equals_3::get_method_info().method_ptr,bool;
201(LocationCacheKey)__receiver,(crate::unity_engine::resource_management::util::locationcachekey::LocationCacheKey)::core::convert::Into::into(other))
202        }
203    }
204}
205
206#[cfg(feature = "unity_engine-resource_management-util-locationcachekey")]
207impl<__T: ILocationCacheKey> ILocationCacheKeyMethods for __T {}
208
209#[cfg(feature = "unity_engine-resource_management-util-locationcachekey")]
210impl LocationCacheKey {
211    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
213    }
214
215    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
216        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
217    }
218
219    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
220        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
221    }
222
223    pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
224        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
225    }
226
227    pub fn equals_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
228        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
229    }
230}
231
232#[cfg(feature = "unity_engine-resource_management-util-locationcachekey")]
233impl LocationCacheKey {
234    #[doc = "Direct (non-virtual) call to `LocationCacheKey`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
235    pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
236        let __mi = Self::get_hash_code_method_info();
237        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
238        __inner(this.into(), ::core::option::Option::None)
239    }
240
241    #[doc = "Direct (non-virtual) call to `LocationCacheKey`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
242    pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
243        let __mi = Self::equals_method_info();
244        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
245            ::core::mem::transmute(__mi.method_ptr);
246        __inner(this.into(), obj, ::core::option::Option::None)
247    }
248
249    #[doc = "Direct (non-virtual) call to `LocationCacheKey`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
250    pub unsafe fn equals_2(
251        this: impl ::core::convert::Into<::unity::IlInstance>,
252        other: crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey,
253    ) -> bool {
254        let __mi = Self::equals_2_method_info();
255        let __inner: extern "C" fn(
256            ::unity::IlInstance,
257            crate::unity_engine::resource_management::util::ioperationcachekey::IOperationCacheKey,
258            ::unity::OptionalMethod,
259        ) -> bool = ::core::mem::transmute(__mi.method_ptr);
260        __inner(this.into(), other, ::core::option::Option::None)
261    }
262}
263
264#[cfg(feature = "unity_engine-resource_management-util-locationcachekey")]
265impl LocationCacheKey {
266    #[doc = "`.ctor(crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation, ::unity::SystemType)` — overload selector"]
267    pub fn new(
268        location: crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
269        desired_type: ::unity::SystemType,
270    ) -> Self {
271        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
272            panic!(
273                "{}
274::{}
275 failed to instantiate",
276                ::core::stringify!(LocationCacheKey),
277                ::core::stringify!(new),
278            )
279        });
280        <Self as ILocationCacheKeyMethods>::ctor(this, location, desired_type);
281        this
282    }
283}
284
285#[cfg(feature = "unity_engine-resource_management-util-locationcachekey")]
286#[doc(hidden)]
287pub mod prelude {
288    pub use super::{ILocationCacheKey, ILocationCacheKeyMethods, LocationCacheKey};
289    pub use crate::system::object::IObject;
290    #[cfg(feature = "system-object")]
291    pub use crate::system::object::IObjectMethods;
292}