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