engage/generated/system/collections/
ihashcodeprovider.rs1#[cfg(feature = "system-collections-ihashcodeprovider-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/system/collections/ihashcodeprovider/IHashCodeProvider.md"))]
10 #[::unity::class(namespace = "System.Collections", name = "IHashCodeProvider")]
11 pub struct IHashCodeProvider {}
12}
13
14#[cfg(feature = "system-collections-ihashcodeprovider-types")]
15pub use __types::*;
16
17#[cfg(feature = "system-collections-ihashcodeprovider")]
18pub trait IIHashCodeProviderMethods: IIHashCodeProvider {
19 #[doc = "`GetHashCode(crate::system::object::Object)` overload"]
20 fn get_hash_code(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
21 unsafe {
22 let __receiver = <IHashCodeProvider 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 <IHashCodeProvider as ::unity::ClassIdentity>::NAME,
35 "GetHashCode",
36 )
37 });
38 let __inner: extern "C" fn(IHashCodeProvider, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
39 ::core::mem::transmute(__vi.method_ptr);
40 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
41 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
42 }
43 }
44 }
45}
46
47#[cfg(feature = "system-collections-ihashcodeprovider")]
48impl<__T: IIHashCodeProvider> IIHashCodeProviderMethods for __T {}
49
50#[cfg(feature = "system-collections-ihashcodeprovider")]
51impl IHashCodeProvider {
52 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
53 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
54 }
55}
56
57#[cfg(feature = "system-collections-ihashcodeprovider")]
58impl IHashCodeProvider {
59 #[doc = "Direct (non-virtual) call to `IHashCodeProvider`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
60 pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> i32 {
61 let __mi = Self::get_hash_code_method_info();
62 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
63 ::core::mem::transmute(__mi.method_ptr);
64 __inner(this.into(), obj, ::core::option::Option::None)
65 }
66}
67
68#[cfg(feature = "system-collections-ihashcodeprovider")]
69#[doc(hidden)]
70pub mod prelude {
71 pub use super::{IHashCodeProvider, IIHashCodeProvider, IIHashCodeProviderMethods};
72}