engage/generated/system/collections/generic/
hashset_1.rs1#[cfg(feature = "system-collections-generic-hashset_1-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 valuetype::{IValueType, ValueType},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/generic/hashset_1/HashSet_1_Enumerator.md"))]
14 #[repr(C)]
15 #[derive(::core::clone::Clone, ::core::marker::Copy)]
16 pub struct HashSet_1_Enumerator<T0> {
17 pub _phantom: ::core::marker::PhantomData<(T0,)>,
18 }
19 impl<T0: ::unity::ClassIdentity> ::unity::ClassIdentity for HashSet_1_Enumerator<T0> {
20 const NAME: &'static str = "HashSet`1.Enumerator";
21 const NAMESPACE: &'static str = "System.Collections.Generic";
22
23 fn class() -> ::unity::Class {
24 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
25 *CACHE.get_or_init(|| {
26 ::unity::Class::lookup(Self::NAMESPACE, Self::NAME)
27 .make_generic(&[<T0 as ::unity::ClassIdentity>::class()])
28 .expect("generic instantiation")
29 })
30 }
31 }
32 impl<T0: ::unity::ClassIdentity> ::unity::IlType for HashSet_1_Enumerator<T0> {
33 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
34 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
35 }
36 }
37
38 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/generic/hashset_1/HashSet_1_Slot.md"))]
39 #[repr(C)]
40 #[derive(::core::clone::Clone, ::core::marker::Copy)]
41 pub struct HashSet_1_Slot<T0> {
42 pub _phantom: ::core::marker::PhantomData<(T0,)>,
43 }
44 impl<T0: ::unity::ClassIdentity> ::unity::ClassIdentity for HashSet_1_Slot<T0> {
45 const NAME: &'static str = "HashSet`1.Slot";
46 const NAMESPACE: &'static str = "System.Collections.Generic";
47
48 fn class() -> ::unity::Class {
49 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
50 *CACHE.get_or_init(|| {
51 ::unity::Class::lookup(Self::NAMESPACE, Self::NAME)
52 .make_generic(&[<T0 as ::unity::ClassIdentity>::class()])
53 .expect("generic instantiation")
54 })
55 }
56 }
57 impl<T0: ::unity::ClassIdentity> ::unity::IlType for HashSet_1_Slot<T0> {
58 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
59 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
60 }
61 }
62
63 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/generic/hashset_1/HashSet_1_ElementCount.md"))]
64 #[repr(C)]
65 #[derive(::core::clone::Clone, ::core::marker::Copy)]
66 pub struct HashSet_1_ElementCount<T0> {
67 pub _phantom: ::core::marker::PhantomData<(T0,)>,
68 }
69 impl<T0: ::unity::ClassIdentity> ::unity::ClassIdentity for HashSet_1_ElementCount<T0> {
70 const NAME: &'static str = "HashSet`1.ElementCount";
71 const NAMESPACE: &'static str = "System.Collections.Generic";
72
73 fn class() -> ::unity::Class {
74 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
75 *CACHE.get_or_init(|| {
76 ::unity::Class::lookup(Self::NAMESPACE, Self::NAME)
77 .make_generic(&[<T0 as ::unity::ClassIdentity>::class()])
78 .expect("generic instantiation")
79 })
80 }
81 }
82 impl<T0: ::unity::ClassIdentity> ::unity::IlType for HashSet_1_ElementCount<T0> {
83 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
84 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
85 }
86 }
87
88 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/generic/hashset_1/HashSet_1.md"))]
89 #[::unity::class(namespace = "System.Collections.Generic", name = "HashSet`1")]
90 #[parent(crate::system::object::Object)]
91 pub struct HashSet_1<T0: ::unity::ClassIdentity> {
92 #[static_field]
93 #[rename(name = "Lower31BitMask")]
94 pub lower31_bit_mask: i32,
95 #[static_field]
96 #[rename(name = "StackAllocThreshold")]
97 pub stack_alloc_threshold: i32,
98 #[static_field]
99 #[rename(name = "ShrinkThreshold")]
100 pub shrink_threshold: i32,
101 #[static_field]
102 #[rename(name = "CapacityName")]
103 pub capacity_name: ::unity::Il2CppString,
104 #[static_field]
105 #[rename(name = "ElementsName")]
106 pub elements_name: ::unity::Il2CppString,
107 #[static_field]
108 #[rename(name = "ComparerName")]
109 pub comparer_name: ::unity::Il2CppString,
110 #[static_field]
111 #[rename(name = "VersionName")]
112 pub version_name: ::unity::Il2CppString,
113 #[rename(name = "_buckets")]
114 pub buckets: ::unity::Array<i32>,
115 #[rename(name = "_slots")]
116 pub slots: ::unity::Array<crate::system::collections::generic::hashset_1::HashSet_1_Slot<T0>>,
117 #[rename(name = "_count")]
118 pub count: i32,
119 #[rename(name = "_lastIndex")]
120 pub last_index: i32,
121 #[rename(name = "_freeList")]
122 pub free_list: i32,
123 #[rename(name = "_comparer")]
124 pub comparer: crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>,
125 #[rename(name = "_version")]
126 pub version: i32,
127 }
128}
129
130#[cfg(feature = "system-collections-generic-hashset_1-types")]
131pub use __types::*;
132
133#[cfg(feature = "system-collections-generic-hashset_1")]
134#[::unity::methods(value)]
135impl<T0: ::unity::ClassIdentity> HashSet_1_Enumerator<T0> {
136 #[doc = "`.ctor(crate::system::collections::generic::hashset_1::HashSet_1<T0>)` overload"]
137 #[method(name = ".ctor", args = 1)]
138 pub fn ctor(self, set: crate::system::collections::generic::hashset_1::HashSet_1<T0>) -> ();
139
140 #[doc = "`Dispose()` overload"]
141 #[method(name = "Dispose", args = 0)]
142 pub fn dispose(self) -> ();
143
144 #[doc = "`MoveNext()` overload"]
145 #[method(name = "MoveNext", args = 0)]
146 pub fn move_next(self) -> bool;
147
148 #[doc = "`get_Current()` overload"]
149 #[method(name = "get_Current", args = 0)]
150 pub fn get_current(self) -> T0;
151
152 #[doc = "`System.Collections.IEnumerator.get_Current()` overload"]
153 #[method(name = "System.Collections.IEnumerator.get_Current", args = 0)]
154 pub fn system_collections_i_enumerator_get_current(self) -> crate::system::object::Object;
155
156 #[doc = "`System.Collections.IEnumerator.Reset()` overload"]
157 #[method(name = "System.Collections.IEnumerator.Reset", args = 0)]
158 pub fn system_collections_i_enumerator_reset(self) -> ();
159}
160
161#[cfg(feature = "system-collections-generic-hashset_1")]
162#[::unity::methods]
163impl<T0: ::unity::ClassIdentity> HashSet_1<T0> {
164 #[doc = "`.ctor()` overload"]
165 #[method(name = ".ctor", args = 0)]
166 pub fn ctor(self) -> ();
167
168 #[doc = "`.ctor(crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>)` overload"]
169 #[method(name = ".ctor", args = 1)]
170 pub fn ctor_2(self, comparer: crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>) -> ();
171
172 #[doc = "`.ctor(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` overload"]
173 #[method(name = ".ctor", args = 1)]
174 pub fn ctor_3(self, collection: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> ();
175
176 #[doc = "`.ctor(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>, crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>)` overload"]
177 #[method(name = ".ctor", args = 2)]
178 pub fn ctor_4(
179 self,
180 collection: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>,
181 comparer: crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>,
182 ) -> ();
183
184 #[doc = "`CopyFrom(crate::system::collections::generic::hashset_1::HashSet_1<T0>)` overload"]
185 #[method(name = "CopyFrom", args = 1)]
186 pub fn copy_from(self, source: crate::system::collections::generic::hashset_1::HashSet_1<T0>) -> ();
187
188 #[doc = "`Clear()` overload"]
189 #[method(name = "Clear", args = 0)]
190 pub fn clear(self) -> ();
191
192 #[doc = "`Contains(T0)` overload"]
193 #[method(name = "Contains", args = 1)]
194 pub fn contains(self, item: T0) -> bool;
195
196 #[doc = "`CopyTo(::unity::Array<T0>, i32)` overload"]
197 #[method(name = "CopyTo", args = 2)]
198 pub fn copy_to(self, array: ::unity::Array<T0>, array_index: i32) -> ();
199
200 #[doc = "`Remove(T0)` overload"]
201 #[method(name = "Remove", args = 1)]
202 pub fn remove(self, item: T0) -> bool;
203
204 #[doc = "`get_Count()` overload"]
205 #[method(name = "get_Count", args = 0)]
206 pub fn get_count(self) -> i32;
207
208 #[doc = "`GetEnumerator()` overload"]
209 #[method(name = "GetEnumerator", args = 0)]
210 pub fn get_enumerator(self) -> crate::system::collections::generic::hashset_1::HashSet_1_Enumerator<T0>;
211
212 #[doc = "`System.Collections.IEnumerable.GetEnumerator()` overload"]
213 #[method(name = "System.Collections.IEnumerable.GetEnumerator", args = 0)]
214 pub fn system_collections_i_enumerable_get_enumerator(self) -> crate::system::collections::ienumerator::IEnumerator;
215
216 #[doc = "`OnDeserialization(crate::system::object::Object)` overload"]
217 #[method(name = "OnDeserialization", args = 1)]
218 pub fn on_deserialization(self, sender: crate::system::object::Object) -> ();
219
220 #[doc = "`Add(T0)` overload"]
221 #[method(name = "Add", args = 1)]
222 pub fn add(self, item: T0) -> bool;
223
224 #[doc = "`UnionWith(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` overload"]
225 #[method(name = "UnionWith", args = 1)]
226 pub fn union_with(self, other: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> ();
227
228 #[doc = "`IntersectWith(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` overload"]
229 #[method(name = "IntersectWith", args = 1)]
230 pub fn intersect_with(self, other: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> ();
231
232 #[doc = "`SetEquals(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` overload"]
233 #[method(name = "SetEquals", args = 1)]
234 pub fn set_equals(self, other: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> bool;
235
236 #[doc = "`CopyTo(::unity::Array<T0>)` overload"]
237 #[method(name = "CopyTo", args = 1)]
238 pub fn copy_to_2(self, array: ::unity::Array<T0>) -> ();
239
240 #[doc = "`CopyTo(::unity::Array<T0>, i32, i32)` overload"]
241 #[method(name = "CopyTo", args = 3)]
242 pub fn copy_to_3(self, array: ::unity::Array<T0>, array_index: i32, count: i32) -> ();
243
244 #[doc = "`get_Comparer()` overload"]
245 #[method(name = "get_Comparer", args = 0)]
246 pub fn get_comparer(self) -> crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>;
247
248 #[doc = "`TrimExcess()` overload"]
249 #[method(name = "TrimExcess", args = 0)]
250 pub fn trim_excess(self) -> ();
251
252 #[doc = "`Initialize(i32)` overload"]
253 #[method(name = "Initialize", args = 1)]
254 pub fn initialize(self, capacity: i32) -> ();
255
256 #[doc = "`IncreaseCapacity()` overload"]
257 #[method(name = "IncreaseCapacity", args = 0)]
258 pub fn increase_capacity(self) -> ();
259
260 #[doc = "`SetCapacity(i32)` overload"]
261 #[method(name = "SetCapacity", args = 1)]
262 pub fn set_capacity(self, new_size: i32) -> ();
263
264 #[doc = "`AddIfNotPresent(T0)` overload"]
265 #[method(name = "AddIfNotPresent", args = 1)]
266 pub fn add_if_not_present(self, value: T0) -> bool;
267
268 #[doc = "`AddValue(i32, i32, T0)` overload"]
269 #[method(name = "AddValue", args = 3)]
270 pub fn add_value(self, index: i32, hash_code: i32, value: T0) -> ();
271
272 #[doc = "`ContainsAllElements(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` overload"]
273 #[method(name = "ContainsAllElements", args = 1)]
274 pub fn contains_all_elements(self, other: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> bool;
275
276 #[doc = "`IntersectWithHashSetWithSameEC(crate::system::collections::generic::hashset_1::HashSet_1<T0>)` overload"]
277 #[method(name = "IntersectWithHashSetWithSameEC", args = 1)]
278 pub fn intersect_with_hash_set_with_same_ec(self, other: crate::system::collections::generic::hashset_1::HashSet_1<T0>) -> ();
279
280 #[doc = "`IntersectWithEnumerable(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` overload"]
281 #[method(name = "IntersectWithEnumerable", args = 1)]
282 pub fn intersect_with_enumerable(self, other: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> ();
283
284 #[doc = "`InternalIndexOf(T0)` overload"]
285 #[method(name = "InternalIndexOf", args = 1)]
286 pub fn internal_index_of(self, item: T0) -> i32;
287
288 #[doc = "`CheckUniqueAndUnfoundElements(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>, bool)` overload"]
289 #[method(name = "CheckUniqueAndUnfoundElements", args = 2)]
290 pub fn check_unique_and_unfound_elements(
291 self,
292 other: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>,
293 return_if_unfound: bool,
294 ) -> crate::system::collections::generic::hashset_1::HashSet_1_ElementCount<T0>;
295
296 #[doc = "`AreEqualityComparersEqual(crate::system::collections::generic::hashset_1::HashSet_1<T0>, crate::system::collections::generic::hashset_1::HashSet_1<T0>)` overload"]
297 #[method(name = "AreEqualityComparersEqual", args = 2)]
298 pub fn are_equality_comparers_equal(
299 set1: crate::system::collections::generic::hashset_1::HashSet_1<T0>,
300 set2: crate::system::collections::generic::hashset_1::HashSet_1<T0>,
301 ) -> bool;
302
303 #[doc = "`InternalGetHashCode(T0)` overload"]
304 #[method(name = "InternalGetHashCode", args = 1)]
305 pub fn internal_get_hash_code(self, item: T0) -> i32;
306}
307
308#[cfg(feature = "system-collections-generic-hashset_1")]
309impl<T0: ::unity::ClassIdentity> HashSet_1<T0> {
310 #[doc = "`.ctor()` — no args"]
311 pub fn new() -> Self {
312 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
313 panic!(
314 "{}
315::{}
316 failed to instantiate",
317 ::core::stringify!(HashSet_1),
318 ::core::stringify!(new),
319 )
320 });
321 <Self as IHashSet_1Methods<T0>>::ctor(this);
322 this
323 }
324
325 #[doc = "`.ctor(crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>)` — overload selector"]
326 pub fn new_2(comparer: crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>) -> Self {
327 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
328 panic!(
329 "{}
330::{}
331 failed to instantiate",
332 ::core::stringify!(HashSet_1),
333 ::core::stringify!(new_2),
334 )
335 });
336 <Self as IHashSet_1Methods<T0>>::ctor_2(this, comparer);
337 this
338 }
339
340 #[doc = "`.ctor(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` — overload selector"]
341 pub fn new_3(collection: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> Self {
342 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
343 panic!(
344 "{}
345::{}
346 failed to instantiate",
347 ::core::stringify!(HashSet_1),
348 ::core::stringify!(new_3),
349 )
350 });
351 <Self as IHashSet_1Methods<T0>>::ctor_3(this, collection);
352 this
353 }
354
355 #[doc = "`.ctor(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>, crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>)` — overload selector"]
356 pub fn new_4(
357 collection: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>,
358 comparer: crate::system::collections::generic::iequalitycomparer_1_interface::IEqualityComparer_1_Interface<T0>,
359 ) -> Self {
360 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
361 panic!(
362 "{}
363::{}
364 failed to instantiate",
365 ::core::stringify!(HashSet_1),
366 ::core::stringify!(new_4),
367 )
368 });
369 <Self as IHashSet_1Methods<T0>>::ctor_4(this, collection, comparer);
370 this
371 }
372}
373
374#[cfg(feature = "system-collections-generic-hashset_1")]
375#[doc(hidden)]
376pub mod prelude {
377 pub use super::{HashSet_1, HashSet_1_ElementCount, HashSet_1_Enumerator, HashSet_1_Slot, IHashSet_1, IHashSet_1Methods};
378 #[cfg(feature = "system-object")]
379 pub use crate::system::object::IObjectMethods;
380 #[cfg(feature = "system-valuetype")]
381 pub use crate::system::valuetype::IValueTypeMethods;
382 pub use crate::system::{object::IObject, valuetype::IValueType};
383}