engage/generated/system/collections/
istructuralequatable.rs1#[cfg(feature = "system-collections-istructuralequatable-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/istructuralequatable/IStructuralEquatable.md"))]
10 #[::unity::class(namespace = "System.Collections", name = "IStructuralEquatable")]
11 pub struct IStructuralEquatable {}
12}
13
14#[cfg(feature = "system-collections-istructuralequatable-types")]
15pub use __types::*;
16
17#[cfg(feature = "system-collections-istructuralequatable")]
18pub trait IIStructuralEquatableMethods: IIStructuralEquatable {
19 #[doc = "`Equals(crate::system::object::Object, crate::system::collections::iequalitycomparer::IEqualityComparer)` overload"]
20 fn equals(
21 self,
22 other: impl ::core::convert::Into<crate::system::object::Object>,
23 comparer: impl ::core::convert::Into<crate::system::collections::iequalitycomparer::IEqualityComparer>,
24 ) -> bool {
25 unsafe {
26 let __receiver = <IStructuralEquatable as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
27 {
28 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
29 let __vi = *__vt.get(0usize).unwrap_or_else(|| {
30 panic!(
31 "unity: virtual slot {}
32 out of range (vtable len {}
33) on the runtime class behind {}
34 (method `{}
35`)",
36 0usize,
37 __vt.len(),
38 <IStructuralEquatable as ::unity::ClassIdentity>::NAME,
39 "Equals",
40 )
41 });
42 let __inner: extern "C" fn(
43 IStructuralEquatable,
44 crate::system::object::Object,
45 crate::system::collections::iequalitycomparer::IEqualityComparer,
46 ::unity::OptionalMethod,
47 ) -> bool = ::core::mem::transmute(__vi.method_ptr);
48 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
49 __inner(
50 __receiver,
51 ::core::convert::Into::into(other),
52 ::core::convert::Into::into(comparer),
53 __mi,
54 )
55 }
56 }
57 }
58 #[doc = "`GetHashCode(crate::system::collections::iequalitycomparer::IEqualityComparer)` overload"]
59 fn get_hash_code(self, comparer: impl ::core::convert::Into<crate::system::collections::iequalitycomparer::IEqualityComparer>) -> i32 {
60 unsafe {
61 let __receiver = <IStructuralEquatable as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
62 {
63 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
64 let __vi = *__vt.get(1usize).unwrap_or_else(|| {
65 panic!(
66 "unity: virtual slot {}
67 out of range (vtable len {}
68) on the runtime class behind {}
69 (method `{}
70`)",
71 1usize,
72 __vt.len(),
73 <IStructuralEquatable as ::unity::ClassIdentity>::NAME,
74 "GetHashCode",
75 )
76 });
77 let __inner: extern "C" fn(
78 IStructuralEquatable,
79 crate::system::collections::iequalitycomparer::IEqualityComparer,
80 ::unity::OptionalMethod,
81 ) -> i32 = ::core::mem::transmute(__vi.method_ptr);
82 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
83 __inner(__receiver, ::core::convert::Into::into(comparer), __mi)
84 }
85 }
86 }
87}
88
89#[cfg(feature = "system-collections-istructuralequatable")]
90impl<__T: IIStructuralEquatable> IIStructuralEquatableMethods for __T {}
91
92#[cfg(feature = "system-collections-istructuralequatable")]
93impl IStructuralEquatable {
94 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
95 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
96 }
97
98 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
99 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
100 }
101}
102
103#[cfg(feature = "system-collections-istructuralequatable")]
104impl IStructuralEquatable {
105 #[doc = "Direct (non-virtual) call to `IStructuralEquatable`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
106 pub unsafe fn equals(
107 this: impl ::core::convert::Into<::unity::IlInstance>,
108 other: crate::system::object::Object,
109 comparer: crate::system::collections::iequalitycomparer::IEqualityComparer,
110 ) -> bool {
111 let __mi = Self::equals_method_info();
112 let __inner: extern "C" fn(
113 ::unity::IlInstance,
114 crate::system::object::Object,
115 crate::system::collections::iequalitycomparer::IEqualityComparer,
116 ::unity::OptionalMethod,
117 ) -> bool = ::core::mem::transmute(__mi.method_ptr);
118 __inner(this.into(), other, comparer, ::core::option::Option::None)
119 }
120
121 #[doc = "Direct (non-virtual) call to `IStructuralEquatable`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
122 pub unsafe fn get_hash_code(
123 this: impl ::core::convert::Into<::unity::IlInstance>,
124 comparer: crate::system::collections::iequalitycomparer::IEqualityComparer,
125 ) -> i32 {
126 let __mi = Self::get_hash_code_method_info();
127 let __inner: extern "C" fn(
128 ::unity::IlInstance,
129 crate::system::collections::iequalitycomparer::IEqualityComparer,
130 ::unity::OptionalMethod,
131 ) -> i32 = ::core::mem::transmute(__mi.method_ptr);
132 __inner(this.into(), comparer, ::core::option::Option::None)
133 }
134}
135
136#[cfg(feature = "system-collections-istructuralequatable")]
137#[doc(hidden)]
138pub mod prelude {
139 pub use super::{IIStructuralEquatable, IIStructuralEquatableMethods, IStructuralEquatable};
140}