engage/generated/app/
listextension.rs1#[cfg(feature = "app-listextension-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/app/listextension/ListExtension.md"))]
11 #[::unity::class(namespace = "App", name = "ListExtension")]
12 #[parent(crate::system::object::Object)]
13 pub struct ListExtension {}
14}
15
16#[cfg(feature = "app-listextension-types")]
17pub use __types::*;
18
19#[cfg(feature = "app-listextension")]
20impl ListExtension {
21 pub fn shuffle<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
22 list: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<M0>>,
23 rand: impl ::core::convert::Into<crate::app::random_2::Random_2>,
24 ) -> crate::system::collections::generic::list_1::List_1<M0> {
25 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
26 ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<ListExtension as ::unity::ClassIdentity>::class(), "Shuffle", 2));
27 #[allow(clippy::type_complexity)]
28 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
29 ::std::sync::OnceLock::new();
30 let _ = true;
31 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
32 ::core::result::Result::Ok(mi) => *mi,
33 ::core::result::Result::Err(e) => {
34 panic!(
35 "method lookup failed: {}
36::{}
37: {}
38",
39 <ListExtension as ::unity::ClassIdentity>::NAME,
40 "Shuffle",
41 e
42 )
43 },
44 };
45 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
46 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
47 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
48 let mut __guard = __cache.lock().unwrap();
49 *__guard
50 .entry(__key)
51 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
52 };
53 unsafe {
54 let __f: extern "C" fn(
55 crate::system::collections::generic::list_1::List_1<M0>,
56 crate::app::random_2::Random_2,
57 ::unity::OptionalMethod,
58 ) -> crate::system::collections::generic::list_1::List_1<M0> = ::core::mem::transmute(__inflated.method_ptr);
59 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
60 __f(
61 ::core::convert::Into::into(list),
62 ::core::convert::Into::into(rand),
63 ::core::option::Option::Some(__mi_opaque),
64 )
65 }
66 }
67}
68
69#[cfg(feature = "app-listextension")]
70#[doc(hidden)]
71pub mod prelude {
72 pub use super::{IListExtension, ListExtension};
73 pub use crate::system::object::IObject;
74 #[cfg(feature = "system-object")]
75 pub use crate::system::object::IObjectMethods;
76}