1#[cfg(feature = "moon_sharp-interpreter-core_lib-io-binaryencoding-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/moon_sharp/interpreter/core_lib/io/binaryencoding/BinaryEncoding.md"))]
10 #[::unity::class(namespace = "MoonSharp.Interpreter.CoreLib.IO", name = "BinaryEncoding")]
11 pub struct BinaryEncoding {}
12}
13
14#[cfg(feature = "moon_sharp-interpreter-core_lib-io-binaryencoding-types")]
15pub use __types::*;
16
17#[cfg(feature = "moon_sharp-interpreter-core_lib-io-binaryencoding")]
18#[doc(hidden)]
19#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
20mod __BinaryEncoding_unity_raw {
21 use super::*;
22 #[doc(hidden)]
23 #[allow(non_snake_case)]
24 pub mod __lookup_ctor {
25 use super::*;
26 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
27 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
28 ::unity::lookup::method_info_on_class_with_signature(<BinaryEncoding as ::unity::ClassIdentity>::class(), ".ctor", 0, param_types, false)
29 });
30 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
31 match &*METHOD {
32 ::core::result::Result::Ok(mi) => *mi,
33 ::core::result::Result::Err(e) => {
34 panic!(
35 "method lookup failed: {}
36::{}
37: {}
38",
39 <BinaryEncoding as ::unity::ClassIdentity>::NAME,
40 ".ctor",
41 e
42 )
43 },
44 }
45 }
46 }
47}
48
49#[cfg(feature = "moon_sharp-interpreter-core_lib-io-binaryencoding")]
50pub trait IBinaryEncodingMethods: IBinaryEncoding {
51 #[doc = "`.ctor()` overload"]
52 fn ctor(self) -> () {
53 unsafe {
54 let __receiver = <BinaryEncoding as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
55 ::unity::il2cpp_call!(__BinaryEncoding_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
56(BinaryEncoding)__receiver)
57 }
58 }
59 #[doc = "`GetByteCount(::unity::Array<u16>, i32, i32)` overload"]
60 fn get_byte_count(
61 self,
62 chars: impl ::core::convert::Into<::unity::Array<u16>>,
63 index: impl ::core::convert::Into<i32>,
64 count: impl ::core::convert::Into<i32>,
65 ) -> i32 {
66 unsafe {
67 let __receiver = <BinaryEncoding as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
68 {
69 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
70 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
71 panic!(
72 "unity: virtual slot {}
73 out of range (vtable len {}
74) on the runtime class behind {}
75 (method `{}
76`)",
77 12usize,
78 __vt.len(),
79 <BinaryEncoding as ::unity::ClassIdentity>::NAME,
80 "GetByteCount",
81 )
82 });
83 let __inner: extern "C" fn(BinaryEncoding, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
84 ::core::mem::transmute(__vi.method_ptr);
85 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
86 __inner(
87 __receiver,
88 ::core::convert::Into::into(chars),
89 ::core::convert::Into::into(index),
90 ::core::convert::Into::into(count),
91 __mi,
92 )
93 }
94 }
95 }
96 #[doc = "`GetBytes(::unity::Array<u16>, i32, i32, ::unity::Array<u8>, i32)` overload"]
97 fn get_bytes(
98 self,
99 chars: impl ::core::convert::Into<::unity::Array<u16>>,
100 char_index: impl ::core::convert::Into<i32>,
101 char_count: impl ::core::convert::Into<i32>,
102 bytes: impl ::core::convert::Into<::unity::Array<u8>>,
103 byte_index: impl ::core::convert::Into<i32>,
104 ) -> i32 {
105 unsafe {
106 let __receiver = <BinaryEncoding as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
107 {
108 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
109 let __vi = *__vt.get(16usize).unwrap_or_else(|| {
110 panic!(
111 "unity: virtual slot {}
112 out of range (vtable len {}
113) on the runtime class behind {}
114 (method `{}
115`)",
116 16usize,
117 __vt.len(),
118 <BinaryEncoding as ::unity::ClassIdentity>::NAME,
119 "GetBytes",
120 )
121 });
122 let __inner: extern "C" fn(BinaryEncoding, ::unity::Array<u16>, i32, i32, ::unity::Array<u8>, i32, ::unity::OptionalMethod) -> i32 =
123 ::core::mem::transmute(__vi.method_ptr);
124 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
125 __inner(
126 __receiver,
127 ::core::convert::Into::into(chars),
128 ::core::convert::Into::into(char_index),
129 ::core::convert::Into::into(char_count),
130 ::core::convert::Into::into(bytes),
131 ::core::convert::Into::into(byte_index),
132 __mi,
133 )
134 }
135 }
136 }
137 #[doc = "`GetCharCount(::unity::Array<u8>, i32, i32)` overload"]
138 fn get_char_count(
139 self,
140 bytes: impl ::core::convert::Into<::unity::Array<u8>>,
141 index: impl ::core::convert::Into<i32>,
142 count: impl ::core::convert::Into<i32>,
143 ) -> i32 {
144 unsafe {
145 let __receiver = <BinaryEncoding as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
146 {
147 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
148 let __vi = *__vt.get(21usize).unwrap_or_else(|| {
149 panic!(
150 "unity: virtual slot {}
151 out of range (vtable len {}
152) on the runtime class behind {}
153 (method `{}
154`)",
155 21usize,
156 __vt.len(),
157 <BinaryEncoding as ::unity::ClassIdentity>::NAME,
158 "GetCharCount",
159 )
160 });
161 let __inner: extern "C" fn(BinaryEncoding, ::unity::Array<u8>, i32, i32, ::unity::OptionalMethod) -> i32 =
162 ::core::mem::transmute(__vi.method_ptr);
163 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
164 __inner(
165 __receiver,
166 ::core::convert::Into::into(bytes),
167 ::core::convert::Into::into(index),
168 ::core::convert::Into::into(count),
169 __mi,
170 )
171 }
172 }
173 }
174 #[doc = "`GetChars(::unity::Array<u8>, i32, i32, ::unity::Array<u16>, i32)` overload"]
175 fn get_chars(
176 self,
177 bytes: impl ::core::convert::Into<::unity::Array<u8>>,
178 byte_index: impl ::core::convert::Into<i32>,
179 byte_count: impl ::core::convert::Into<i32>,
180 chars: impl ::core::convert::Into<::unity::Array<u16>>,
181 char_index: impl ::core::convert::Into<i32>,
182 ) -> i32 {
183 unsafe {
184 let __receiver = <BinaryEncoding as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
185 {
186 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
187 let __vi = *__vt.get(25usize).unwrap_or_else(|| {
188 panic!(
189 "unity: virtual slot {}
190 out of range (vtable len {}
191) on the runtime class behind {}
192 (method `{}
193`)",
194 25usize,
195 __vt.len(),
196 <BinaryEncoding as ::unity::ClassIdentity>::NAME,
197 "GetChars",
198 )
199 });
200 let __inner: extern "C" fn(BinaryEncoding, ::unity::Array<u8>, i32, i32, ::unity::Array<u16>, i32, ::unity::OptionalMethod) -> i32 =
201 ::core::mem::transmute(__vi.method_ptr);
202 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
203 __inner(
204 __receiver,
205 ::core::convert::Into::into(bytes),
206 ::core::convert::Into::into(byte_index),
207 ::core::convert::Into::into(byte_count),
208 ::core::convert::Into::into(chars),
209 ::core::convert::Into::into(char_index),
210 __mi,
211 )
212 }
213 }
214 }
215 #[doc = "`GetMaxByteCount(i32)` overload"]
216 fn get_max_byte_count(self, char_count: impl ::core::convert::Into<i32>) -> i32 {
217 unsafe {
218 let __receiver = <BinaryEncoding as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
219 {
220 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
221 let __vi = *__vt.get(31usize).unwrap_or_else(|| {
222 panic!(
223 "unity: virtual slot {}
224 out of range (vtable len {}
225) on the runtime class behind {}
226 (method `{}
227`)",
228 31usize,
229 __vt.len(),
230 <BinaryEncoding as ::unity::ClassIdentity>::NAME,
231 "GetMaxByteCount",
232 )
233 });
234 let __inner: extern "C" fn(BinaryEncoding, i32, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
235 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
236 __inner(__receiver, ::core::convert::Into::into(char_count), __mi)
237 }
238 }
239 }
240 #[doc = "`GetMaxCharCount(i32)` overload"]
241 fn get_max_char_count(self, byte_count: impl ::core::convert::Into<i32>) -> i32 {
242 unsafe {
243 let __receiver = <BinaryEncoding as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
244 {
245 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
246 let __vi = *__vt.get(32usize).unwrap_or_else(|| {
247 panic!(
248 "unity: virtual slot {}
249 out of range (vtable len {}
250) on the runtime class behind {}
251 (method `{}
252`)",
253 32usize,
254 __vt.len(),
255 <BinaryEncoding as ::unity::ClassIdentity>::NAME,
256 "GetMaxCharCount",
257 )
258 });
259 let __inner: extern "C" fn(BinaryEncoding, i32, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
260 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
261 __inner(__receiver, ::core::convert::Into::into(byte_count), __mi)
262 }
263 }
264 }
265}
266
267#[cfg(feature = "moon_sharp-interpreter-core_lib-io-binaryencoding")]
268impl<__T: IBinaryEncoding> IBinaryEncodingMethods for __T {}
269
270#[cfg(feature = "moon_sharp-interpreter-core_lib-io-binaryencoding")]
271impl BinaryEncoding {
272 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
273 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
274 }
275
276 pub fn get_byte_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
277 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
278 }
279
280 pub fn get_bytes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
281 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
282 }
283
284 pub fn get_char_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
285 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
286 }
287
288 pub fn get_chars_method_info() -> &'static ::unity::il2cpp::MethodInfo {
289 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
290 }
291
292 pub fn get_max_byte_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
293 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
294 }
295
296 pub fn get_max_char_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
297 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
298 }
299}
300
301#[cfg(feature = "moon_sharp-interpreter-core_lib-io-binaryencoding")]
302impl BinaryEncoding {
303 #[doc = "Direct (non-virtual) call to `BinaryEncoding`'s own `GetByteCount`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
304 pub unsafe fn get_byte_count(this: impl ::core::convert::Into<::unity::IlInstance>, chars: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
305 let __mi = Self::get_byte_count_method_info();
306 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
307 ::core::mem::transmute(__mi.method_ptr);
308 __inner(this.into(), chars, index, count, ::core::option::Option::None)
309 }
310
311 #[doc = "Direct (non-virtual) call to `BinaryEncoding`'s own `GetBytes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
312 pub unsafe fn get_bytes(
313 this: impl ::core::convert::Into<::unity::IlInstance>,
314 chars: ::unity::Array<u16>,
315 char_index: i32,
316 char_count: i32,
317 bytes: ::unity::Array<u8>,
318 byte_index: i32,
319 ) -> i32 {
320 let __mi = Self::get_bytes_method_info();
321 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::Array<u8>, i32, ::unity::OptionalMethod) -> i32 =
322 ::core::mem::transmute(__mi.method_ptr);
323 __inner(
324 this.into(),
325 chars,
326 char_index,
327 char_count,
328 bytes,
329 byte_index,
330 ::core::option::Option::None,
331 )
332 }
333
334 #[doc = "Direct (non-virtual) call to `BinaryEncoding`'s own `GetCharCount`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
335 pub unsafe fn get_char_count(this: impl ::core::convert::Into<::unity::IlInstance>, bytes: ::unity::Array<u8>, index: i32, count: i32) -> i32 {
336 let __mi = Self::get_char_count_method_info();
337 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u8>, i32, i32, ::unity::OptionalMethod) -> i32 =
338 ::core::mem::transmute(__mi.method_ptr);
339 __inner(this.into(), bytes, index, count, ::core::option::Option::None)
340 }
341
342 #[doc = "Direct (non-virtual) call to `BinaryEncoding`'s own `GetChars`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
343 pub unsafe fn get_chars(
344 this: impl ::core::convert::Into<::unity::IlInstance>,
345 bytes: ::unity::Array<u8>,
346 byte_index: i32,
347 byte_count: i32,
348 chars: ::unity::Array<u16>,
349 char_index: i32,
350 ) -> i32 {
351 let __mi = Self::get_chars_method_info();
352 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u8>, i32, i32, ::unity::Array<u16>, i32, ::unity::OptionalMethod) -> i32 =
353 ::core::mem::transmute(__mi.method_ptr);
354 __inner(
355 this.into(),
356 bytes,
357 byte_index,
358 byte_count,
359 chars,
360 char_index,
361 ::core::option::Option::None,
362 )
363 }
364
365 #[doc = "Direct (non-virtual) call to `BinaryEncoding`'s own `GetMaxByteCount`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
366 pub unsafe fn get_max_byte_count(this: impl ::core::convert::Into<::unity::IlInstance>, char_count: i32) -> i32 {
367 let __mi = Self::get_max_byte_count_method_info();
368 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
369 __inner(this.into(), char_count, ::core::option::Option::None)
370 }
371
372 #[doc = "Direct (non-virtual) call to `BinaryEncoding`'s own `GetMaxCharCount`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
373 pub unsafe fn get_max_char_count(this: impl ::core::convert::Into<::unity::IlInstance>, byte_count: i32) -> i32 {
374 let __mi = Self::get_max_char_count_method_info();
375 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
376 __inner(this.into(), byte_count, ::core::option::Option::None)
377 }
378}
379
380#[cfg(feature = "moon_sharp-interpreter-core_lib-io-binaryencoding")]
381impl BinaryEncoding {
382 #[doc = "`.ctor()` — no args"]
383 pub fn new() -> Self {
384 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
385 panic!(
386 "{}
387::{}
388 failed to instantiate",
389 ::core::stringify!(BinaryEncoding),
390 ::core::stringify!(new),
391 )
392 });
393 <Self as IBinaryEncodingMethods>::ctor(this);
394 this
395 }
396}
397
398#[cfg(feature = "moon_sharp-interpreter-core_lib-io-binaryencoding")]
399#[doc(hidden)]
400pub mod prelude {
401 pub use super::{BinaryEncoding, IBinaryEncoding, IBinaryEncodingMethods};
402}