engage/generated/system/collections/
icollection.rs1#[cfg(feature = "system-collections-icollection-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/icollection/ICollection.md"))]
10 #[::unity::class(namespace = "System.Collections", name = "ICollection")]
11 pub struct ICollection {}
12}
13
14#[cfg(feature = "system-collections-icollection-types")]
15pub use __types::*;
16
17#[cfg(feature = "system-collections-icollection")]
18pub trait IICollectionMethods: IICollection {
19 #[doc = "`CopyTo(::unity::IlInstance, i32)` overload"]
20 fn copy_to(self, array: impl ::core::convert::Into<::unity::IlInstance>, index: impl ::core::convert::Into<i32>) -> () {
21 unsafe {
22 let __receiver = <ICollection 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 <ICollection as ::unity::ClassIdentity>::NAME,
35 "CopyTo",
36 )
37 });
38 let __inner: extern "C" fn(ICollection, ::unity::IlInstance, i32, ::unity::OptionalMethod) -> () =
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(array), ::core::convert::Into::into(index), __mi)
42 }
43 }
44 }
45 #[doc = "`get_Count()` overload"]
46 fn get_count(self) -> i32 {
47 unsafe {
48 let __receiver = <ICollection 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 <ICollection as ::unity::ClassIdentity>::NAME,
61 "get_Count",
62 )
63 });
64 let __inner: extern "C" fn(ICollection, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
65 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
66 __inner(__receiver, __mi)
67 }
68 }
69 }
70 #[doc = "`get_SyncRoot()` overload"]
71 fn get_sync_root(self) -> crate::system::object::Object {
72 unsafe {
73 let __receiver = <ICollection as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
74 {
75 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
76 let __vi = *__vt.get(2usize).unwrap_or_else(|| {
77 panic!(
78 "unity: virtual slot {}
79 out of range (vtable len {}
80) on the runtime class behind {}
81 (method `{}
82`)",
83 2usize,
84 __vt.len(),
85 <ICollection as ::unity::ClassIdentity>::NAME,
86 "get_SyncRoot",
87 )
88 });
89 let __inner: extern "C" fn(ICollection, ::unity::OptionalMethod) -> crate::system::object::Object =
90 ::core::mem::transmute(__vi.method_ptr);
91 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
92 __inner(__receiver, __mi)
93 }
94 }
95 }
96 #[doc = "`get_IsSynchronized()` overload"]
97 fn get_is_synchronized(self) -> bool {
98 unsafe {
99 let __receiver = <ICollection as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100 {
101 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
102 let __vi = *__vt.get(3usize).unwrap_or_else(|| {
103 panic!(
104 "unity: virtual slot {}
105 out of range (vtable len {}
106) on the runtime class behind {}
107 (method `{}
108`)",
109 3usize,
110 __vt.len(),
111 <ICollection as ::unity::ClassIdentity>::NAME,
112 "get_IsSynchronized",
113 )
114 });
115 let __inner: extern "C" fn(ICollection, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
116 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
117 __inner(__receiver, __mi)
118 }
119 }
120 }
121}
122
123#[cfg(feature = "system-collections-icollection")]
124impl<__T: IICollection> IICollectionMethods for __T {}
125
126#[cfg(feature = "system-collections-icollection")]
127impl ICollection {
128 pub fn copy_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
129 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
130 }
131
132 pub fn get_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
133 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
134 }
135
136 pub fn get_sync_root_method_info() -> &'static ::unity::il2cpp::MethodInfo {
137 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
138 }
139
140 pub fn get_is_synchronized_method_info() -> &'static ::unity::il2cpp::MethodInfo {
141 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
142 }
143}
144
145#[cfg(feature = "system-collections-icollection")]
146impl ICollection {
147 #[doc = "Direct (non-virtual) call to `ICollection`'s own `CopyTo`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
148 pub unsafe fn copy_to(this: impl ::core::convert::Into<::unity::IlInstance>, array: ::unity::IlInstance, index: i32) -> () {
149 let __mi = Self::copy_to_method_info();
150 let __inner: extern "C" fn(::unity::IlInstance, ::unity::IlInstance, i32, ::unity::OptionalMethod) -> () =
151 ::core::mem::transmute(__mi.method_ptr);
152 __inner(this.into(), array, index, ::core::option::Option::None)
153 }
154
155 #[doc = "Direct (non-virtual) call to `ICollection`'s own `get_Count`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
156 pub unsafe fn get_count(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
157 let __mi = Self::get_count_method_info();
158 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
159 __inner(this.into(), ::core::option::Option::None)
160 }
161
162 #[doc = "Direct (non-virtual) call to `ICollection`'s own `get_SyncRoot`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
163 pub unsafe fn get_sync_root(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::object::Object {
164 let __mi = Self::get_sync_root_method_info();
165 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::object::Object =
166 ::core::mem::transmute(__mi.method_ptr);
167 __inner(this.into(), ::core::option::Option::None)
168 }
169
170 #[doc = "Direct (non-virtual) call to `ICollection`'s own `get_IsSynchronized`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
171 pub unsafe fn get_is_synchronized(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
172 let __mi = Self::get_is_synchronized_method_info();
173 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
174 __inner(this.into(), ::core::option::Option::None)
175 }
176}
177
178#[cfg(feature = "system-collections-icollection")]
179#[doc(hidden)]
180pub mod prelude {
181 pub use super::{ICollection, IICollection, IICollectionMethods};
182}