1#[cfg(feature = "system-collections-ilist-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/ilist/IList.md"))]
10 #[::unity::class(namespace = "System.Collections", name = "IList")]
11 pub struct IList {}
12}
13
14#[cfg(feature = "system-collections-ilist-types")]
15pub use __types::*;
16
17#[cfg(feature = "system-collections-ilist")]
18pub trait IIListMethods: IIList {
19 #[doc = "`get_Item(i32)` overload"]
20 fn get_item(self, index: impl ::core::convert::Into<i32>) -> crate::system::object::Object {
21 unsafe {
22 let __receiver = <IList 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 <IList as ::unity::ClassIdentity>::NAME,
35 "get_Item",
36 )
37 });
38 let __inner: extern "C" fn(IList, i32, ::unity::OptionalMethod) -> crate::system::object::Object =
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(index), __mi)
42 }
43 }
44 }
45 #[doc = "`set_Item(i32, crate::system::object::Object)` overload"]
46 fn set_item(self, index: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<crate::system::object::Object>) -> () {
47 unsafe {
48 let __receiver = <IList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
49 {
50 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
51 let __vi = *__vt.get(1usize).unwrap_or_else(|| {
52 panic!(
53 "unity: virtual slot {}
54 out of range (vtable len {}
55) on the runtime class behind {}
56 (method `{}
57`)",
58 1usize,
59 __vt.len(),
60 <IList as ::unity::ClassIdentity>::NAME,
61 "set_Item",
62 )
63 });
64 let __inner: extern "C" fn(IList, i32, crate::system::object::Object, ::unity::OptionalMethod) -> () =
65 ::core::mem::transmute(__vi.method_ptr);
66 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
67 __inner(__receiver, ::core::convert::Into::into(index), ::core::convert::Into::into(value), __mi)
68 }
69 }
70 }
71 #[doc = "`Add(crate::system::object::Object)` overload"]
72 fn add(self, value: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
73 unsafe {
74 let __receiver = <IList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
75 {
76 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
77 let __vi = *__vt.get(2usize).unwrap_or_else(|| {
78 panic!(
79 "unity: virtual slot {}
80 out of range (vtable len {}
81) on the runtime class behind {}
82 (method `{}
83`)",
84 2usize,
85 __vt.len(),
86 <IList as ::unity::ClassIdentity>::NAME,
87 "Add",
88 )
89 });
90 let __inner: extern "C" fn(IList, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
91 ::core::mem::transmute(__vi.method_ptr);
92 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
93 __inner(__receiver, ::core::convert::Into::into(value), __mi)
94 }
95 }
96 }
97 #[doc = "`Contains(crate::system::object::Object)` overload"]
98 fn contains(self, value: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
99 unsafe {
100 let __receiver = <IList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
101 {
102 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
103 let __vi = *__vt.get(3usize).unwrap_or_else(|| {
104 panic!(
105 "unity: virtual slot {}
106 out of range (vtable len {}
107) on the runtime class behind {}
108 (method `{}
109`)",
110 3usize,
111 __vt.len(),
112 <IList as ::unity::ClassIdentity>::NAME,
113 "Contains",
114 )
115 });
116 let __inner: extern "C" fn(IList, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
117 ::core::mem::transmute(__vi.method_ptr);
118 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
119 __inner(__receiver, ::core::convert::Into::into(value), __mi)
120 }
121 }
122 }
123 #[doc = "`Clear()` overload"]
124 fn clear(self) -> () {
125 unsafe {
126 let __receiver = <IList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
127 {
128 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
129 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
130 panic!(
131 "unity: virtual slot {}
132 out of range (vtable len {}
133) on the runtime class behind {}
134 (method `{}
135`)",
136 4usize,
137 __vt.len(),
138 <IList as ::unity::ClassIdentity>::NAME,
139 "Clear",
140 )
141 });
142 let __inner: extern "C" fn(IList, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
143 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
144 __inner(__receiver, __mi)
145 }
146 }
147 }
148 #[doc = "`get_IsReadOnly()` overload"]
149 fn get_is_read_only(self) -> bool {
150 unsafe {
151 let __receiver = <IList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
152 {
153 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
154 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
155 panic!(
156 "unity: virtual slot {}
157 out of range (vtable len {}
158) on the runtime class behind {}
159 (method `{}
160`)",
161 5usize,
162 __vt.len(),
163 <IList as ::unity::ClassIdentity>::NAME,
164 "get_IsReadOnly",
165 )
166 });
167 let __inner: extern "C" fn(IList, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
168 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
169 __inner(__receiver, __mi)
170 }
171 }
172 }
173 #[doc = "`IndexOf(crate::system::object::Object)` overload"]
174 fn index_of(self, value: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
175 unsafe {
176 let __receiver = <IList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
177 {
178 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
179 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
180 panic!(
181 "unity: virtual slot {}
182 out of range (vtable len {}
183) on the runtime class behind {}
184 (method `{}
185`)",
186 6usize,
187 __vt.len(),
188 <IList as ::unity::ClassIdentity>::NAME,
189 "IndexOf",
190 )
191 });
192 let __inner: extern "C" fn(IList, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
193 ::core::mem::transmute(__vi.method_ptr);
194 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
195 __inner(__receiver, ::core::convert::Into::into(value), __mi)
196 }
197 }
198 }
199 #[doc = "`Insert(i32, crate::system::object::Object)` overload"]
200 fn insert(self, index: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<crate::system::object::Object>) -> () {
201 unsafe {
202 let __receiver = <IList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
203 {
204 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
205 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
206 panic!(
207 "unity: virtual slot {}
208 out of range (vtable len {}
209) on the runtime class behind {}
210 (method `{}
211`)",
212 7usize,
213 __vt.len(),
214 <IList as ::unity::ClassIdentity>::NAME,
215 "Insert",
216 )
217 });
218 let __inner: extern "C" fn(IList, i32, crate::system::object::Object, ::unity::OptionalMethod) -> () =
219 ::core::mem::transmute(__vi.method_ptr);
220 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
221 __inner(__receiver, ::core::convert::Into::into(index), ::core::convert::Into::into(value), __mi)
222 }
223 }
224 }
225 #[doc = "`Remove(crate::system::object::Object)` overload"]
226 fn remove(self, value: impl ::core::convert::Into<crate::system::object::Object>) -> () {
227 unsafe {
228 let __receiver = <IList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
229 {
230 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
231 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
232 panic!(
233 "unity: virtual slot {}
234 out of range (vtable len {}
235) on the runtime class behind {}
236 (method `{}
237`)",
238 8usize,
239 __vt.len(),
240 <IList as ::unity::ClassIdentity>::NAME,
241 "Remove",
242 )
243 });
244 let __inner: extern "C" fn(IList, crate::system::object::Object, ::unity::OptionalMethod) -> () =
245 ::core::mem::transmute(__vi.method_ptr);
246 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
247 __inner(__receiver, ::core::convert::Into::into(value), __mi)
248 }
249 }
250 }
251 #[doc = "`RemoveAt(i32)` overload"]
252 fn remove_at(self, index: impl ::core::convert::Into<i32>) -> () {
253 unsafe {
254 let __receiver = <IList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
255 {
256 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
257 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
258 panic!(
259 "unity: virtual slot {}
260 out of range (vtable len {}
261) on the runtime class behind {}
262 (method `{}
263`)",
264 9usize,
265 __vt.len(),
266 <IList as ::unity::ClassIdentity>::NAME,
267 "RemoveAt",
268 )
269 });
270 let __inner: extern "C" fn(IList, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
271 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
272 __inner(__receiver, ::core::convert::Into::into(index), __mi)
273 }
274 }
275 }
276}
277
278#[cfg(feature = "system-collections-ilist")]
279impl<__T: IIList> IIListMethods for __T {}
280
281#[cfg(feature = "system-collections-ilist")]
282impl IList {
283 pub fn get_item_method_info() -> &'static ::unity::il2cpp::MethodInfo {
284 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
285 }
286
287 pub fn set_item_method_info() -> &'static ::unity::il2cpp::MethodInfo {
288 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
289 }
290
291 pub fn add_method_info() -> &'static ::unity::il2cpp::MethodInfo {
292 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
293 }
294
295 pub fn contains_method_info() -> &'static ::unity::il2cpp::MethodInfo {
296 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
297 }
298
299 pub fn clear_method_info() -> &'static ::unity::il2cpp::MethodInfo {
300 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
301 }
302
303 pub fn get_is_read_only_method_info() -> &'static ::unity::il2cpp::MethodInfo {
304 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
305 }
306
307 pub fn index_of_method_info() -> &'static ::unity::il2cpp::MethodInfo {
308 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
309 }
310
311 pub fn insert_method_info() -> &'static ::unity::il2cpp::MethodInfo {
312 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
313 }
314
315 pub fn remove_method_info() -> &'static ::unity::il2cpp::MethodInfo {
316 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
317 }
318
319 pub fn remove_at_method_info() -> &'static ::unity::il2cpp::MethodInfo {
320 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
321 }
322}
323
324#[cfg(feature = "system-collections-ilist")]
325impl IList {
326 #[doc = "Direct (non-virtual) call to `IList`'s own `get_Item`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
327 pub unsafe fn get_item(this: impl ::core::convert::Into<::unity::IlInstance>, index: i32) -> crate::system::object::Object {
328 let __mi = Self::get_item_method_info();
329 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> crate::system::object::Object =
330 ::core::mem::transmute(__mi.method_ptr);
331 __inner(this.into(), index, ::core::option::Option::None)
332 }
333
334 #[doc = "Direct (non-virtual) call to `IList`'s own `set_Item`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
335 pub unsafe fn set_item(this: impl ::core::convert::Into<::unity::IlInstance>, index: i32, value: crate::system::object::Object) -> () {
336 let __mi = Self::set_item_method_info();
337 let __inner: extern "C" fn(::unity::IlInstance, i32, crate::system::object::Object, ::unity::OptionalMethod) -> () =
338 ::core::mem::transmute(__mi.method_ptr);
339 __inner(this.into(), index, value, ::core::option::Option::None)
340 }
341
342 #[doc = "Direct (non-virtual) call to `IList`'s own `Add`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
343 pub unsafe fn add(this: impl ::core::convert::Into<::unity::IlInstance>, value: crate::system::object::Object) -> i32 {
344 let __mi = Self::add_method_info();
345 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
346 ::core::mem::transmute(__mi.method_ptr);
347 __inner(this.into(), value, ::core::option::Option::None)
348 }
349
350 #[doc = "Direct (non-virtual) call to `IList`'s own `Contains`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
351 pub unsafe fn contains(this: impl ::core::convert::Into<::unity::IlInstance>, value: crate::system::object::Object) -> bool {
352 let __mi = Self::contains_method_info();
353 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
354 ::core::mem::transmute(__mi.method_ptr);
355 __inner(this.into(), value, ::core::option::Option::None)
356 }
357
358 #[doc = "Direct (non-virtual) call to `IList`'s own `Clear`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
359 pub unsafe fn clear(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
360 let __mi = Self::clear_method_info();
361 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
362 __inner(this.into(), ::core::option::Option::None)
363 }
364
365 #[doc = "Direct (non-virtual) call to `IList`'s own `get_IsReadOnly`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
366 pub unsafe fn get_is_read_only(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
367 let __mi = Self::get_is_read_only_method_info();
368 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
369 __inner(this.into(), ::core::option::Option::None)
370 }
371
372 #[doc = "Direct (non-virtual) call to `IList`'s own `IndexOf`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
373 pub unsafe fn index_of(this: impl ::core::convert::Into<::unity::IlInstance>, value: crate::system::object::Object) -> i32 {
374 let __mi = Self::index_of_method_info();
375 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> i32 =
376 ::core::mem::transmute(__mi.method_ptr);
377 __inner(this.into(), value, ::core::option::Option::None)
378 }
379
380 #[doc = "Direct (non-virtual) call to `IList`'s own `Insert`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
381 pub unsafe fn insert(this: impl ::core::convert::Into<::unity::IlInstance>, index: i32, value: crate::system::object::Object) -> () {
382 let __mi = Self::insert_method_info();
383 let __inner: extern "C" fn(::unity::IlInstance, i32, crate::system::object::Object, ::unity::OptionalMethod) -> () =
384 ::core::mem::transmute(__mi.method_ptr);
385 __inner(this.into(), index, value, ::core::option::Option::None)
386 }
387
388 #[doc = "Direct (non-virtual) call to `IList`'s own `Remove`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
389 pub unsafe fn remove(this: impl ::core::convert::Into<::unity::IlInstance>, value: crate::system::object::Object) -> () {
390 let __mi = Self::remove_method_info();
391 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> () =
392 ::core::mem::transmute(__mi.method_ptr);
393 __inner(this.into(), value, ::core::option::Option::None)
394 }
395
396 #[doc = "Direct (non-virtual) call to `IList`'s own `RemoveAt`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
397 pub unsafe fn remove_at(this: impl ::core::convert::Into<::unity::IlInstance>, index: i32) -> () {
398 let __mi = Self::remove_at_method_info();
399 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
400 __inner(this.into(), index, ::core::option::Option::None)
401 }
402}
403
404#[cfg(feature = "system-collections-ilist")]
405#[doc(hidden)]
406pub mod prelude {
407 pub use super::{IIList, IIListMethods, IList};
408}