1#[cfg(feature = "system-collections-generic-byteequalitycomparer-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 collections::generic::equalitycomparer_1::{EqualityComparer_1, IEqualityComparer_1},
10 object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/generic/byteequalitycomparer/ByteEqualityComparer.md"))]
14 #[::unity::class(namespace = "System.Collections.Generic", name = "ByteEqualityComparer")]
15 #[parent(crate::system::collections::generic::equalitycomparer_1::EqualityComparer_1<u8>)]
16 pub struct ByteEqualityComparer {}
17}
18
19#[cfg(feature = "system-collections-generic-byteequalitycomparer-types")]
20pub use __types::*;
21
22#[cfg(feature = "system-collections-generic-byteequalitycomparer")]
23pub trait IByteEqualityComparerMethods: IByteEqualityComparer {
24 #[doc = "`Equals(u8, u8)` overload"]
25 fn equals(self, x: impl ::core::convert::Into<u8>, y: impl ::core::convert::Into<u8>) -> bool {
26 unsafe {
27 let __receiver = <ByteEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
28 {
29 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
30 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
31 panic!(
32 "unity: virtual slot {}
33 out of range (vtable len {}
34) on the runtime class behind {}
35 (method `{}
36`)",
37 8usize,
38 __vt.len(),
39 <ByteEqualityComparer as ::unity::ClassIdentity>::NAME,
40 "Equals",
41 )
42 });
43 let __inner: extern "C" fn(ByteEqualityComparer, u8, u8, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
44 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
45 __inner(__receiver, ::core::convert::Into::into(x), ::core::convert::Into::into(y), __mi)
46 }
47 }
48 }
49 #[doc = "`GetHashCode(u8)` overload"]
50 fn get_hash_code(self, b: impl ::core::convert::Into<u8>) -> i32 {
51 unsafe {
52 let __receiver = <ByteEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
53 {
54 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
55 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
56 panic!(
57 "unity: virtual slot {}
58 out of range (vtable len {}
59) on the runtime class behind {}
60 (method `{}
61`)",
62 9usize,
63 __vt.len(),
64 <ByteEqualityComparer as ::unity::ClassIdentity>::NAME,
65 "GetHashCode",
66 )
67 });
68 let __inner: extern "C" fn(ByteEqualityComparer, u8, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
69 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
70 __inner(__receiver, ::core::convert::Into::into(b), __mi)
71 }
72 }
73 }
74 #[doc = "`IndexOf(::unity::Array<u8>, u8, i32, i32)` overload"]
75 fn index_of(
76 self,
77 array: impl ::core::convert::Into<::unity::Array<u8>>,
78 value: impl ::core::convert::Into<u8>,
79 start_index: impl ::core::convert::Into<i32>,
80 count: impl ::core::convert::Into<i32>,
81 ) -> i32 {
82 unsafe {
83 let __receiver = <ByteEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
84 {
85 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
86 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
87 panic!(
88 "unity: virtual slot {}
89 out of range (vtable len {}
90) on the runtime class behind {}
91 (method `{}
92`)",
93 10usize,
94 __vt.len(),
95 <ByteEqualityComparer as ::unity::ClassIdentity>::NAME,
96 "IndexOf",
97 )
98 });
99 let __inner: extern "C" fn(ByteEqualityComparer, ::unity::Array<u8>, u8, i32, i32, ::unity::OptionalMethod) -> i32 =
100 ::core::mem::transmute(__vi.method_ptr);
101 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
102 __inner(
103 __receiver,
104 ::core::convert::Into::into(array),
105 ::core::convert::Into::into(value),
106 ::core::convert::Into::into(start_index),
107 ::core::convert::Into::into(count),
108 __mi,
109 )
110 }
111 }
112 }
113 #[doc = "`LastIndexOf(::unity::Array<u8>, u8, i32, i32)` overload"]
114 fn last_index_of(
115 self,
116 array: impl ::core::convert::Into<::unity::Array<u8>>,
117 value: impl ::core::convert::Into<u8>,
118 start_index: impl ::core::convert::Into<i32>,
119 count: impl ::core::convert::Into<i32>,
120 ) -> i32 {
121 unsafe {
122 let __receiver = <ByteEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
123 {
124 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
125 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
126 panic!(
127 "unity: virtual slot {}
128 out of range (vtable len {}
129) on the runtime class behind {}
130 (method `{}
131`)",
132 11usize,
133 __vt.len(),
134 <ByteEqualityComparer as ::unity::ClassIdentity>::NAME,
135 "LastIndexOf",
136 )
137 });
138 let __inner: extern "C" fn(ByteEqualityComparer, ::unity::Array<u8>, u8, i32, i32, ::unity::OptionalMethod) -> i32 =
139 ::core::mem::transmute(__vi.method_ptr);
140 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
141 __inner(
142 __receiver,
143 ::core::convert::Into::into(array),
144 ::core::convert::Into::into(value),
145 ::core::convert::Into::into(start_index),
146 ::core::convert::Into::into(count),
147 __mi,
148 )
149 }
150 }
151 }
152 #[doc = "`Equals(crate::system::object::Object)` overload"]
153 fn equals_2(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
154 unsafe {
155 let __receiver = <ByteEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
156 {
157 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
158 let __vi = *__vt.get(0usize).unwrap_or_else(|| {
159 panic!(
160 "unity: virtual slot {}
161 out of range (vtable len {}
162) on the runtime class behind {}
163 (method `{}
164`)",
165 0usize,
166 __vt.len(),
167 <ByteEqualityComparer as ::unity::ClassIdentity>::NAME,
168 "Equals",
169 )
170 });
171 let __inner: extern "C" fn(ByteEqualityComparer, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
172 ::core::mem::transmute(__vi.method_ptr);
173 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
174 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
175 }
176 }
177 }
178 #[doc = "`GetHashCode()` overload"]
179 fn get_hash_code_2(self) -> i32 {
180 unsafe {
181 let __receiver = <ByteEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
182 {
183 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
184 let __vi = *__vt.get(2usize).unwrap_or_else(|| {
185 panic!(
186 "unity: virtual slot {}
187 out of range (vtable len {}
188) on the runtime class behind {}
189 (method `{}
190`)",
191 2usize,
192 __vt.len(),
193 <ByteEqualityComparer as ::unity::ClassIdentity>::NAME,
194 "GetHashCode",
195 )
196 });
197 let __inner: extern "C" fn(ByteEqualityComparer, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
198 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
199 __inner(__receiver, __mi)
200 }
201 }
202 }
203 #[doc = "`.ctor()` overload"]
204 fn ctor(self) -> () {
205 unsafe {
206 let __receiver = <ByteEqualityComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
207 ::unity::il2cpp_call!((::unity::module_base()+0x33960c0usize)as*mut u8,();
208(ByteEqualityComparer)__receiver)
209 }
210 }
211}
212
213#[cfg(feature = "system-collections-generic-byteequalitycomparer")]
214impl<__T: IByteEqualityComparer> IByteEqualityComparerMethods for __T {}
215
216#[cfg(feature = "system-collections-generic-byteequalitycomparer")]
217impl ByteEqualityComparer {
218 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
219 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
220 }
221
222 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
223 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
224 }
225
226 pub fn index_of_method_info() -> &'static ::unity::il2cpp::MethodInfo {
227 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
228 }
229
230 pub fn last_index_of_method_info() -> &'static ::unity::il2cpp::MethodInfo {
231 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
232 }
233
234 pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
235 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
236 }
237
238 pub fn get_hash_code_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
239 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
240 }
241
242 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
243 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
244 }
245}
246
247#[cfg(feature = "system-collections-generic-byteequalitycomparer")]
248impl ByteEqualityComparer {
249 #[doc = "Direct (non-virtual) call to `ByteEqualityComparer`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
250 pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, x: u8, y: u8) -> bool {
251 let __mi = Self::equals_method_info();
252 let __inner: extern "C" fn(::unity::IlInstance, u8, u8, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
253 __inner(this.into(), x, y, ::core::option::Option::None)
254 }
255
256 #[doc = "Direct (non-virtual) call to `ByteEqualityComparer`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
257 pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>, b: u8) -> i32 {
258 let __mi = Self::get_hash_code_method_info();
259 let __inner: extern "C" fn(::unity::IlInstance, u8, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
260 __inner(this.into(), b, ::core::option::Option::None)
261 }
262
263 #[doc = "Direct (non-virtual) call to `ByteEqualityComparer`'s own `IndexOf`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
264 pub unsafe fn index_of(
265 this: impl ::core::convert::Into<::unity::IlInstance>,
266 array: ::unity::Array<u8>,
267 value: u8,
268 start_index: i32,
269 count: i32,
270 ) -> i32 {
271 let __mi = Self::index_of_method_info();
272 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u8>, u8, i32, i32, ::unity::OptionalMethod) -> i32 =
273 ::core::mem::transmute(__mi.method_ptr);
274 __inner(this.into(), array, value, start_index, count, ::core::option::Option::None)
275 }
276
277 #[doc = "Direct (non-virtual) call to `ByteEqualityComparer`'s own `LastIndexOf`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
278 pub unsafe fn last_index_of(
279 this: impl ::core::convert::Into<::unity::IlInstance>,
280 array: ::unity::Array<u8>,
281 value: u8,
282 start_index: i32,
283 count: i32,
284 ) -> i32 {
285 let __mi = Self::last_index_of_method_info();
286 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u8>, u8, i32, i32, ::unity::OptionalMethod) -> i32 =
287 ::core::mem::transmute(__mi.method_ptr);
288 __inner(this.into(), array, value, start_index, count, ::core::option::Option::None)
289 }
290
291 #[doc = "Direct (non-virtual) call to `ByteEqualityComparer`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
292 pub unsafe fn equals_2(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
293 let __mi = Self::equals_2_method_info();
294 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
295 ::core::mem::transmute(__mi.method_ptr);
296 __inner(this.into(), obj, ::core::option::Option::None)
297 }
298
299 #[doc = "Direct (non-virtual) call to `ByteEqualityComparer`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
300 pub unsafe fn get_hash_code_2(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
301 let __mi = Self::get_hash_code_2_method_info();
302 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
303 __inner(this.into(), ::core::option::Option::None)
304 }
305}
306
307#[cfg(feature = "system-collections-generic-byteequalitycomparer")]
308impl ByteEqualityComparer {
309 #[doc = "`.ctor()` — no args"]
310 pub fn new() -> Self {
311 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
312 panic!(
313 "{}
314::{}
315 failed to instantiate",
316 ::core::stringify!(ByteEqualityComparer),
317 ::core::stringify!(new),
318 )
319 });
320 <Self as IByteEqualityComparerMethods>::ctor(this);
321 this
322 }
323}
324
325#[cfg(feature = "system-collections-generic-byteequalitycomparer")]
326#[doc(hidden)]
327pub mod prelude {
328 pub use super::{ByteEqualityComparer, IByteEqualityComparer, IByteEqualityComparerMethods};
329 #[cfg(feature = "system-collections-generic-equalitycomparer_1")]
330 pub use crate::system::collections::generic::equalitycomparer_1::IEqualityComparer_1Methods;
331 #[cfg(feature = "system-object")]
332 pub use crate::system::object::IObjectMethods;
333 pub use crate::system::{collections::generic::equalitycomparer_1::IEqualityComparer_1, object::IObject};
334}