engage/generated/system/collections/generic/
objectequalitycomparer.rs1#[cfg(feature = "system-collections-generic-objectequalitycomparer-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/system/collections/generic/objectequalitycomparer/ObjectEqualityComparer.md"))]
11 #[::unity::class(namespace = "System.Collections.Generic", name = "ObjectEqualityComparer")]
12 #[parent(crate::system::object::Object)]
13 pub struct ObjectEqualityComparer {
14 #[static_field]
15 #[rename(name = "Default")]
16 pub default: crate::system::collections::generic::objectequalitycomparer::ObjectEqualityComparer,
17 }
18}
19
20#[cfg(feature = "system-collections-generic-objectequalitycomparer-types")]
21pub use __types::*;
22
23#[cfg(feature = "system-collections-generic-objectequalitycomparer")]
24impl ObjectEqualityComparer {
25 #[doc = "`.cctor()` overload"]
26 pub fn cctor() -> () {
27 unsafe {
28 ::unity::il2cpp_call!((::unity::module_base()+0x37df840usize)as*mut u8,();
29 )
30 }
31 }
32}
33
34#[cfg(feature = "system-collections-generic-objectequalitycomparer")]
35pub trait IObjectEqualityComparerMethods: IObjectEqualityComparer {
36 #[doc = "`.ctor()` overload"]
37 fn ctor(self) -> () {
38 unsafe {
39 let __receiver =
40 <ObjectEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
41 ::unity::il2cpp_call!((::unity::module_base()+0x37df7e0usize)as*mut u8,();
42(ObjectEqualityComparer)__receiver)
43 }
44 }
45 #[doc = "`System.Collections.IEqualityComparer.GetHashCode(crate::system::object::Object)` overload"]
46 fn system_collections_i_equality_comparer_get_hash_code(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
47 unsafe {
48 let __receiver =
49 <ObjectEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
50 {
51 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
52 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
53 panic!(
54 "unity: virtual slot {}
55 out of range (vtable len {}
56) on the runtime class behind {}
57 (method `{}
58`)",
59 5usize,
60 __vt.len(),
61 <ObjectEqualityComparer as ::unity::ClassIdentity>::NAME,
62 "System.Collections.IEqualityComparer.GetHashCode",
63 )
64 });
65 let __inner: extern "C" fn(ObjectEqualityComparer, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
66 ::core::mem::transmute(__vi.method_ptr);
67 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
68 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
69 }
70 }
71 }
72 #[doc = "`System.Collections.IEqualityComparer.Equals(crate::system::object::Object, crate::system::object::Object)` overload"]
73 fn system_collections_i_equality_comparer_equals(
74 self,
75 x: impl ::core::convert::Into<crate::system::object::Object>,
76 y: impl ::core::convert::Into<crate::system::object::Object>,
77 ) -> bool {
78 unsafe {
79 let __receiver =
80 <ObjectEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
81 {
82 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
83 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
84 panic!(
85 "unity: virtual slot {}
86 out of range (vtable len {}
87) on the runtime class behind {}
88 (method `{}
89`)",
90 4usize,
91 __vt.len(),
92 <ObjectEqualityComparer as ::unity::ClassIdentity>::NAME,
93 "System.Collections.IEqualityComparer.Equals",
94 )
95 });
96 let __inner: extern "C" fn(
97 ObjectEqualityComparer,
98 crate::system::object::Object,
99 crate::system::object::Object,
100 ::unity::OptionalMethod,
101 ) -> bool = ::core::mem::transmute(__vi.method_ptr);
102 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
103 __inner(__receiver, ::core::convert::Into::into(x), ::core::convert::Into::into(y), __mi)
104 }
105 }
106 }
107}
108
109#[cfg(feature = "system-collections-generic-objectequalitycomparer")]
110impl<__T: IObjectEqualityComparer> IObjectEqualityComparerMethods for __T {}
111
112#[cfg(feature = "system-collections-generic-objectequalitycomparer")]
113impl ObjectEqualityComparer {
114 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
115 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
116 }
117
118 pub fn system_collections_i_equality_comparer_get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
119 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
120 }
121
122 pub fn system_collections_i_equality_comparer_equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
123 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
124 }
125
126 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
127 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
128 }
129}
130
131#[cfg(feature = "system-collections-generic-objectequalitycomparer")]
132impl ObjectEqualityComparer {
133 #[doc = "Direct (non-virtual) call to `ObjectEqualityComparer`'s own `System.Collections.IEqualityComparer.GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
134 pub unsafe fn system_collections_i_equality_comparer_get_hash_code(
135 this: impl ::core::convert::Into<::unity::IlInstance>,
136 obj: crate::system::object::Object,
137 ) -> i32 {
138 let __mi = Self::system_collections_i_equality_comparer_get_hash_code_method_info();
139 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
140 ::core::mem::transmute(__mi.method_ptr);
141 __inner(this.into(), obj, ::core::option::Option::None)
142 }
143
144 #[doc = "Direct (non-virtual) call to `ObjectEqualityComparer`'s own `System.Collections.IEqualityComparer.Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
145 pub unsafe fn system_collections_i_equality_comparer_equals(
146 this: impl ::core::convert::Into<::unity::IlInstance>,
147 x: crate::system::object::Object,
148 y: crate::system::object::Object,
149 ) -> bool {
150 let __mi = Self::system_collections_i_equality_comparer_equals_method_info();
151 let __inner: extern "C" fn(
152 ::unity::IlInstance,
153 crate::system::object::Object,
154 crate::system::object::Object,
155 ::unity::OptionalMethod,
156 ) -> bool = ::core::mem::transmute(__mi.method_ptr);
157 __inner(this.into(), x, y, ::core::option::Option::None)
158 }
159}
160
161#[cfg(feature = "system-collections-generic-objectequalitycomparer")]
162impl ObjectEqualityComparer {
163 #[doc = "`.ctor()` — no args"]
164 pub fn new() -> Self {
165 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
166 panic!(
167 "{}
168::{}
169 failed to instantiate",
170 ::core::stringify!(ObjectEqualityComparer),
171 ::core::stringify!(new),
172 )
173 });
174 <Self as IObjectEqualityComparerMethods>::ctor(this);
175 this
176 }
177}
178
179#[cfg(feature = "system-collections-generic-objectequalitycomparer")]
180#[doc(hidden)]
181pub mod prelude {
182 pub use super::{IObjectEqualityComparer, IObjectEqualityComparerMethods, ObjectEqualityComparer};
183 pub use crate::system::object::IObject;
184 #[cfg(feature = "system-object")]
185 pub use crate::system::object::IObjectMethods;
186}