1#[cfg(feature = "system-io-binaryreader-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/binaryreader/BinaryReader.md"))]
11 #[::unity::class(namespace = "System.IO", name = "BinaryReader")]
12 #[parent(crate::system::object::Object)]
13 pub struct BinaryReader {
14 #[offset(16)]
15 #[rename(name = "m_stream")]
16 pub m_stream: crate::system::io::stream::Stream,
17 #[offset(24)]
18 #[rename(name = "m_buffer")]
19 pub m_buffer: ::unity::Array<u8>,
20 #[offset(40)]
21 #[rename(name = "m_charBytes")]
22 pub m_char_bytes: ::unity::Array<u8>,
23 #[offset(48)]
24 #[rename(name = "m_singleChar")]
25 pub m_single_char: ::unity::Array<u16>,
26 #[offset(56)]
27 #[rename(name = "m_charBuffer")]
28 pub m_char_buffer: ::unity::Array<u16>,
29 #[offset(64)]
30 #[rename(name = "m_maxCharsSize")]
31 pub m_max_chars_size: i32,
32 #[offset(68)]
33 #[rename(name = "m_2BytesPerChar")]
34 pub m_2bytes_per_char: bool,
35 #[offset(69)]
36 #[rename(name = "m_isMemoryStream")]
37 pub m_is_memory_stream: bool,
38 #[offset(70)]
39 #[rename(name = "m_leaveOpen")]
40 pub m_leave_open: bool,
41 }
42}
43
44#[cfg(feature = "system-io-binaryreader-types")]
45pub use __types::*;
46
47#[cfg(feature = "system-io-binaryreader")]
48pub trait IBinaryReaderMethods: IBinaryReader {
49 #[doc = "`.ctor(crate::system::io::stream::Stream)` overload"]
50 fn ctor(self, input: impl ::core::convert::Into<crate::system::io::stream::Stream>) -> () {
51 unsafe {
52 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
53 ::unity::il2cpp_call!((::unity::module_base()+0x338e130usize)as*mut u8,();
54(BinaryReader)__receiver,(crate::system::io::stream::Stream)::core::convert::Into::into(input))
55 }
56 }
57 #[doc = "`get_BaseStream()` overload"]
58 fn get_base_stream(self) -> crate::system::io::stream::Stream {
59 unsafe {
60 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
61 {
62 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
63 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
64 panic!(
65 "unity: virtual slot {}
66 out of range (vtable len {}
67) on the runtime class behind {}
68 (method `{}
69`)",
70 5usize,
71 __vt.len(),
72 <BinaryReader as ::unity::ClassIdentity>::NAME,
73 "get_BaseStream",
74 )
75 });
76 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> crate::system::io::stream::Stream =
77 ::core::mem::transmute(__vi.method_ptr);
78 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
79 __inner(__receiver, __mi)
80 }
81 }
82 }
83 #[doc = "`Close()` overload"]
84 fn close(self) -> () {
85 unsafe {
86 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
87 {
88 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
89 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
90 panic!(
91 "unity: virtual slot {}
92 out of range (vtable len {}
93) on the runtime class behind {}
94 (method `{}
95`)",
96 6usize,
97 __vt.len(),
98 <BinaryReader as ::unity::ClassIdentity>::NAME,
99 "Close",
100 )
101 });
102 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
103 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
104 __inner(__receiver, __mi)
105 }
106 }
107 }
108 #[doc = "`Dispose(bool)` overload"]
109 fn dispose(self, disposing: impl ::core::convert::Into<bool>) -> () {
110 unsafe {
111 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
112 {
113 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
114 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
115 panic!(
116 "unity: virtual slot {}
117 out of range (vtable len {}
118) on the runtime class behind {}
119 (method `{}
120`)",
121 7usize,
122 __vt.len(),
123 <BinaryReader as ::unity::ClassIdentity>::NAME,
124 "Dispose",
125 )
126 });
127 let __inner: extern "C" fn(BinaryReader, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
128 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
129 __inner(__receiver, ::core::convert::Into::into(disposing), __mi)
130 }
131 }
132 }
133 #[doc = "`Dispose()` overload"]
134 fn dispose_2(self) -> () {
135 unsafe {
136 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
137 {
138 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
139 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
140 panic!(
141 "unity: virtual slot {}
142 out of range (vtable len {}
143) on the runtime class behind {}
144 (method `{}
145`)",
146 4usize,
147 __vt.len(),
148 <BinaryReader as ::unity::ClassIdentity>::NAME,
149 "Dispose",
150 )
151 });
152 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
153 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
154 __inner(__receiver, __mi)
155 }
156 }
157 }
158 #[doc = "`Read()` overload"]
159 fn read(self) -> i32 {
160 unsafe {
161 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
162 {
163 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
164 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
165 panic!(
166 "unity: virtual slot {}
167 out of range (vtable len {}
168) on the runtime class behind {}
169 (method `{}
170`)",
171 8usize,
172 __vt.len(),
173 <BinaryReader as ::unity::ClassIdentity>::NAME,
174 "Read",
175 )
176 });
177 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
178 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
179 __inner(__receiver, __mi)
180 }
181 }
182 }
183 #[doc = "`ReadBoolean()` overload"]
184 fn read_boolean(self) -> bool {
185 unsafe {
186 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
187 {
188 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
189 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
190 panic!(
191 "unity: virtual slot {}
192 out of range (vtable len {}
193) on the runtime class behind {}
194 (method `{}
195`)",
196 9usize,
197 __vt.len(),
198 <BinaryReader as ::unity::ClassIdentity>::NAME,
199 "ReadBoolean",
200 )
201 });
202 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
203 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
204 __inner(__receiver, __mi)
205 }
206 }
207 }
208 #[doc = "`ReadByte()` overload"]
209 fn read_byte(self) -> u8 {
210 unsafe {
211 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
212 {
213 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
214 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
215 panic!(
216 "unity: virtual slot {}
217 out of range (vtable len {}
218) on the runtime class behind {}
219 (method `{}
220`)",
221 10usize,
222 __vt.len(),
223 <BinaryReader as ::unity::ClassIdentity>::NAME,
224 "ReadByte",
225 )
226 });
227 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> u8 = ::core::mem::transmute(__vi.method_ptr);
228 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
229 __inner(__receiver, __mi)
230 }
231 }
232 }
233 #[doc = "`ReadSByte()` overload"]
234 fn read_s_byte(self) -> i8 {
235 unsafe {
236 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
237 {
238 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
239 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
240 panic!(
241 "unity: virtual slot {}
242 out of range (vtable len {}
243) on the runtime class behind {}
244 (method `{}
245`)",
246 11usize,
247 __vt.len(),
248 <BinaryReader as ::unity::ClassIdentity>::NAME,
249 "ReadSByte",
250 )
251 });
252 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> i8 = ::core::mem::transmute(__vi.method_ptr);
253 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
254 __inner(__receiver, __mi)
255 }
256 }
257 }
258 #[doc = "`ReadChar()` overload"]
259 fn read_char(self) -> u16 {
260 unsafe {
261 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
262 {
263 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
264 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
265 panic!(
266 "unity: virtual slot {}
267 out of range (vtable len {}
268) on the runtime class behind {}
269 (method `{}
270`)",
271 12usize,
272 __vt.len(),
273 <BinaryReader as ::unity::ClassIdentity>::NAME,
274 "ReadChar",
275 )
276 });
277 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> u16 = ::core::mem::transmute(__vi.method_ptr);
278 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
279 __inner(__receiver, __mi)
280 }
281 }
282 }
283 #[doc = "`ReadInt16()` overload"]
284 fn read_int16(self) -> i16 {
285 unsafe {
286 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
287 {
288 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
289 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
290 panic!(
291 "unity: virtual slot {}
292 out of range (vtable len {}
293) on the runtime class behind {}
294 (method `{}
295`)",
296 13usize,
297 __vt.len(),
298 <BinaryReader as ::unity::ClassIdentity>::NAME,
299 "ReadInt16",
300 )
301 });
302 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> i16 = ::core::mem::transmute(__vi.method_ptr);
303 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
304 __inner(__receiver, __mi)
305 }
306 }
307 }
308 #[doc = "`ReadUInt16()` overload"]
309 fn read_u_int16(self) -> u16 {
310 unsafe {
311 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
312 {
313 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
314 let __vi = *__vt.get(14usize).unwrap_or_else(|| {
315 panic!(
316 "unity: virtual slot {}
317 out of range (vtable len {}
318) on the runtime class behind {}
319 (method `{}
320`)",
321 14usize,
322 __vt.len(),
323 <BinaryReader as ::unity::ClassIdentity>::NAME,
324 "ReadUInt16",
325 )
326 });
327 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> u16 = ::core::mem::transmute(__vi.method_ptr);
328 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
329 __inner(__receiver, __mi)
330 }
331 }
332 }
333 #[doc = "`ReadInt32()` overload"]
334 fn read_int32(self) -> i32 {
335 unsafe {
336 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
337 {
338 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
339 let __vi = *__vt.get(15usize).unwrap_or_else(|| {
340 panic!(
341 "unity: virtual slot {}
342 out of range (vtable len {}
343) on the runtime class behind {}
344 (method `{}
345`)",
346 15usize,
347 __vt.len(),
348 <BinaryReader as ::unity::ClassIdentity>::NAME,
349 "ReadInt32",
350 )
351 });
352 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
353 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
354 __inner(__receiver, __mi)
355 }
356 }
357 }
358 #[doc = "`ReadUInt32()` overload"]
359 fn read_u_int32(self) -> u32 {
360 unsafe {
361 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
362 {
363 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
364 let __vi = *__vt.get(16usize).unwrap_or_else(|| {
365 panic!(
366 "unity: virtual slot {}
367 out of range (vtable len {}
368) on the runtime class behind {}
369 (method `{}
370`)",
371 16usize,
372 __vt.len(),
373 <BinaryReader as ::unity::ClassIdentity>::NAME,
374 "ReadUInt32",
375 )
376 });
377 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> u32 = ::core::mem::transmute(__vi.method_ptr);
378 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
379 __inner(__receiver, __mi)
380 }
381 }
382 }
383 #[doc = "`ReadInt64()` overload"]
384 fn read_int64(self) -> i64 {
385 unsafe {
386 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
387 {
388 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
389 let __vi = *__vt.get(17usize).unwrap_or_else(|| {
390 panic!(
391 "unity: virtual slot {}
392 out of range (vtable len {}
393) on the runtime class behind {}
394 (method `{}
395`)",
396 17usize,
397 __vt.len(),
398 <BinaryReader as ::unity::ClassIdentity>::NAME,
399 "ReadInt64",
400 )
401 });
402 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> i64 = ::core::mem::transmute(__vi.method_ptr);
403 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
404 __inner(__receiver, __mi)
405 }
406 }
407 }
408 #[doc = "`ReadUInt64()` overload"]
409 fn read_u_int64(self) -> u64 {
410 unsafe {
411 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
412 {
413 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
414 let __vi = *__vt.get(18usize).unwrap_or_else(|| {
415 panic!(
416 "unity: virtual slot {}
417 out of range (vtable len {}
418) on the runtime class behind {}
419 (method `{}
420`)",
421 18usize,
422 __vt.len(),
423 <BinaryReader as ::unity::ClassIdentity>::NAME,
424 "ReadUInt64",
425 )
426 });
427 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> u64 = ::core::mem::transmute(__vi.method_ptr);
428 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
429 __inner(__receiver, __mi)
430 }
431 }
432 }
433 #[doc = "`ReadSingle()` overload"]
434 fn read_single(self) -> f32 {
435 unsafe {
436 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
437 {
438 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
439 let __vi = *__vt.get(19usize).unwrap_or_else(|| {
440 panic!(
441 "unity: virtual slot {}
442 out of range (vtable len {}
443) on the runtime class behind {}
444 (method `{}
445`)",
446 19usize,
447 __vt.len(),
448 <BinaryReader as ::unity::ClassIdentity>::NAME,
449 "ReadSingle",
450 )
451 });
452 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> f32 = ::core::mem::transmute(__vi.method_ptr);
453 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
454 __inner(__receiver, __mi)
455 }
456 }
457 }
458 #[doc = "`ReadDouble()` overload"]
459 fn read_double(self) -> f64 {
460 unsafe {
461 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
462 {
463 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
464 let __vi = *__vt.get(20usize).unwrap_or_else(|| {
465 panic!(
466 "unity: virtual slot {}
467 out of range (vtable len {}
468) on the runtime class behind {}
469 (method `{}
470`)",
471 20usize,
472 __vt.len(),
473 <BinaryReader as ::unity::ClassIdentity>::NAME,
474 "ReadDouble",
475 )
476 });
477 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> f64 = ::core::mem::transmute(__vi.method_ptr);
478 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
479 __inner(__receiver, __mi)
480 }
481 }
482 }
483 #[doc = "`ReadString()` overload"]
484 fn read_string(self) -> ::unity::Il2CppString {
485 unsafe {
486 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
487 {
488 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
489 let __vi = *__vt.get(22usize).unwrap_or_else(|| {
490 panic!(
491 "unity: virtual slot {}
492 out of range (vtable len {}
493) on the runtime class behind {}
494 (method `{}
495`)",
496 22usize,
497 __vt.len(),
498 <BinaryReader as ::unity::ClassIdentity>::NAME,
499 "ReadString",
500 )
501 });
502 let __inner: extern "C" fn(BinaryReader, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
503 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
504 __inner(__receiver, __mi)
505 }
506 }
507 }
508 #[doc = "`InternalReadChars(::unity::Array<u16>, i32, i32)` overload"]
509 fn internal_read_chars(
510 self,
511 buffer: impl ::core::convert::Into<::unity::Array<u16>>,
512 index: impl ::core::convert::Into<i32>,
513 count: impl ::core::convert::Into<i32>,
514 ) -> i32 {
515 unsafe {
516 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
517 ::unity::il2cpp_call!((::unity::module_base()+0x338f370usize)as*mut u8,i32;
518(BinaryReader)__receiver,(::unity::Array<u16>)::core::convert::Into::into(buffer),(i32)::core::convert::Into::into(index),(i32)::core::convert::Into::into(count))
519 }
520 }
521 #[doc = "`InternalReadOneChar()` overload"]
522 fn internal_read_one_char(self) -> i32 {
523 unsafe {
524 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
525 ::unity::il2cpp_call!((::unity::module_base()+0x338e580usize)as*mut u8,i32;
526(BinaryReader)__receiver)
527 }
528 }
529 #[doc = "`ReadChars(i32)` overload"]
530 fn read_chars(self, count: impl ::core::convert::Into<i32>) -> ::unity::Array<u16> {
531 unsafe {
532 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
533 {
534 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
535 let __vi = *__vt.get(23usize).unwrap_or_else(|| {
536 panic!(
537 "unity: virtual slot {}
538 out of range (vtable len {}
539) on the runtime class behind {}
540 (method `{}
541`)",
542 23usize,
543 __vt.len(),
544 <BinaryReader as ::unity::ClassIdentity>::NAME,
545 "ReadChars",
546 )
547 });
548 let __inner: extern "C" fn(BinaryReader, i32, ::unity::OptionalMethod) -> ::unity::Array<u16> =
549 ::core::mem::transmute(__vi.method_ptr);
550 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
551 __inner(__receiver, ::core::convert::Into::into(count), __mi)
552 }
553 }
554 }
555 #[doc = "`Read(::unity::Array<u8>, i32, i32)` overload"]
556 fn read_2(
557 self,
558 buffer: impl ::core::convert::Into<::unity::Array<u8>>,
559 index: impl ::core::convert::Into<i32>,
560 count: impl ::core::convert::Into<i32>,
561 ) -> i32 {
562 unsafe {
563 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
564 {
565 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
566 let __vi = *__vt.get(24usize).unwrap_or_else(|| {
567 panic!(
568 "unity: virtual slot {}
569 out of range (vtable len {}
570) on the runtime class behind {}
571 (method `{}
572`)",
573 24usize,
574 __vt.len(),
575 <BinaryReader as ::unity::ClassIdentity>::NAME,
576 "Read",
577 )
578 });
579 let __inner: extern "C" fn(BinaryReader, ::unity::Array<u8>, i32, i32, ::unity::OptionalMethod) -> i32 =
580 ::core::mem::transmute(__vi.method_ptr);
581 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
582 __inner(
583 __receiver,
584 ::core::convert::Into::into(buffer),
585 ::core::convert::Into::into(index),
586 ::core::convert::Into::into(count),
587 __mi,
588 )
589 }
590 }
591 }
592 #[doc = "`ReadBytes(i32)` overload"]
593 fn read_bytes(self, count: impl ::core::convert::Into<i32>) -> ::unity::Array<u8> {
594 unsafe {
595 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
596 {
597 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
598 let __vi = *__vt.get(25usize).unwrap_or_else(|| {
599 panic!(
600 "unity: virtual slot {}
601 out of range (vtable len {}
602) on the runtime class behind {}
603 (method `{}
604`)",
605 25usize,
606 __vt.len(),
607 <BinaryReader as ::unity::ClassIdentity>::NAME,
608 "ReadBytes",
609 )
610 });
611 let __inner: extern "C" fn(BinaryReader, i32, ::unity::OptionalMethod) -> ::unity::Array<u8> =
612 ::core::mem::transmute(__vi.method_ptr);
613 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
614 __inner(__receiver, ::core::convert::Into::into(count), __mi)
615 }
616 }
617 }
618 #[doc = "`FillBuffer(i32)` overload"]
619 fn fill_buffer(self, num_bytes: impl ::core::convert::Into<i32>) -> () {
620 unsafe {
621 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
622 {
623 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
624 let __vi = *__vt.get(26usize).unwrap_or_else(|| {
625 panic!(
626 "unity: virtual slot {}
627 out of range (vtable len {}
628) on the runtime class behind {}
629 (method `{}
630`)",
631 26usize,
632 __vt.len(),
633 <BinaryReader as ::unity::ClassIdentity>::NAME,
634 "FillBuffer",
635 )
636 });
637 let __inner: extern "C" fn(BinaryReader, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
638 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
639 __inner(__receiver, ::core::convert::Into::into(num_bytes), __mi)
640 }
641 }
642 }
643 #[doc = "`Read7BitEncodedInt()` overload"]
644 fn read7_bit_encoded_int(self) -> i32 {
645 unsafe {
646 let __receiver = <BinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
647 ::unity::il2cpp_call!((::unity::module_base()+0x338f2c0usize)as*mut u8,i32;
648(BinaryReader)__receiver)
649 }
650 }
651}
652
653#[cfg(feature = "system-io-binaryreader")]
654impl<__T: IBinaryReader> IBinaryReaderMethods for __T {}
655
656#[cfg(feature = "system-io-binaryreader")]
657impl BinaryReader {
658 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
659 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
660 }
661
662 pub fn get_base_stream_method_info() -> &'static ::unity::il2cpp::MethodInfo {
663 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
664 }
665
666 pub fn close_method_info() -> &'static ::unity::il2cpp::MethodInfo {
667 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
668 }
669
670 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
671 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
672 }
673
674 pub fn dispose_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
675 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
676 }
677
678 pub fn read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
679 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
680 }
681
682 pub fn read_boolean_method_info() -> &'static ::unity::il2cpp::MethodInfo {
683 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
684 }
685
686 pub fn read_byte_method_info() -> &'static ::unity::il2cpp::MethodInfo {
687 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
688 }
689
690 pub fn read_s_byte_method_info() -> &'static ::unity::il2cpp::MethodInfo {
691 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
692 }
693
694 pub fn read_char_method_info() -> &'static ::unity::il2cpp::MethodInfo {
695 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
696 }
697
698 pub fn read_int16_method_info() -> &'static ::unity::il2cpp::MethodInfo {
699 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
700 }
701
702 pub fn read_u_int16_method_info() -> &'static ::unity::il2cpp::MethodInfo {
703 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
704 }
705
706 pub fn read_int32_method_info() -> &'static ::unity::il2cpp::MethodInfo {
707 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
708 }
709
710 pub fn read_u_int32_method_info() -> &'static ::unity::il2cpp::MethodInfo {
711 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
712 }
713
714 pub fn read_int64_method_info() -> &'static ::unity::il2cpp::MethodInfo {
715 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
716 }
717
718 pub fn read_u_int64_method_info() -> &'static ::unity::il2cpp::MethodInfo {
719 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
720 }
721
722 pub fn read_single_method_info() -> &'static ::unity::il2cpp::MethodInfo {
723 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
724 }
725
726 pub fn read_double_method_info() -> &'static ::unity::il2cpp::MethodInfo {
727 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
728 }
729
730 pub fn read_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
731 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
732 }
733
734 pub fn internal_read_chars_method_info() -> &'static ::unity::il2cpp::MethodInfo {
735 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
736 }
737
738 pub fn internal_read_one_char_method_info() -> &'static ::unity::il2cpp::MethodInfo {
739 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
740 }
741
742 pub fn read_chars_method_info() -> &'static ::unity::il2cpp::MethodInfo {
743 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
744 }
745
746 pub fn read_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
747 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
748 }
749
750 pub fn read_bytes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
751 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
752 }
753
754 pub fn fill_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
755 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[27]
756 }
757
758 pub fn read7_bit_encoded_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
759 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[28]
760 }
761}
762
763#[cfg(feature = "system-io-binaryreader")]
764impl BinaryReader {
765 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `get_BaseStream`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
766 pub unsafe fn get_base_stream(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::io::stream::Stream {
767 let __mi = Self::get_base_stream_method_info();
768 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::io::stream::Stream =
769 ::core::mem::transmute(__mi.method_ptr);
770 __inner(this.into(), ::core::option::Option::None)
771 }
772
773 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `Close`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
774 pub unsafe fn close(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
775 let __mi = Self::close_method_info();
776 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
777 __inner(this.into(), ::core::option::Option::None)
778 }
779
780 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
781 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>, disposing: bool) -> () {
782 let __mi = Self::dispose_method_info();
783 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
784 __inner(this.into(), disposing, ::core::option::Option::None)
785 }
786
787 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
788 pub unsafe fn dispose_2(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
789 let __mi = Self::dispose_2_method_info();
790 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
791 __inner(this.into(), ::core::option::Option::None)
792 }
793
794 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
795 pub unsafe fn read(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
796 let __mi = Self::read_method_info();
797 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
798 __inner(this.into(), ::core::option::Option::None)
799 }
800
801 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadBoolean`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
802 pub unsafe fn read_boolean(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
803 let __mi = Self::read_boolean_method_info();
804 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
805 __inner(this.into(), ::core::option::Option::None)
806 }
807
808 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadByte`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
809 pub unsafe fn read_byte(this: impl ::core::convert::Into<::unity::IlInstance>) -> u8 {
810 let __mi = Self::read_byte_method_info();
811 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> u8 = ::core::mem::transmute(__mi.method_ptr);
812 __inner(this.into(), ::core::option::Option::None)
813 }
814
815 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadSByte`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
816 pub unsafe fn read_s_byte(this: impl ::core::convert::Into<::unity::IlInstance>) -> i8 {
817 let __mi = Self::read_s_byte_method_info();
818 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i8 = ::core::mem::transmute(__mi.method_ptr);
819 __inner(this.into(), ::core::option::Option::None)
820 }
821
822 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadChar`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
823 pub unsafe fn read_char(this: impl ::core::convert::Into<::unity::IlInstance>) -> u16 {
824 let __mi = Self::read_char_method_info();
825 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> u16 = ::core::mem::transmute(__mi.method_ptr);
826 __inner(this.into(), ::core::option::Option::None)
827 }
828
829 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadInt16`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
830 pub unsafe fn read_int16(this: impl ::core::convert::Into<::unity::IlInstance>) -> i16 {
831 let __mi = Self::read_int16_method_info();
832 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i16 = ::core::mem::transmute(__mi.method_ptr);
833 __inner(this.into(), ::core::option::Option::None)
834 }
835
836 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadUInt16`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
837 pub unsafe fn read_u_int16(this: impl ::core::convert::Into<::unity::IlInstance>) -> u16 {
838 let __mi = Self::read_u_int16_method_info();
839 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> u16 = ::core::mem::transmute(__mi.method_ptr);
840 __inner(this.into(), ::core::option::Option::None)
841 }
842
843 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadInt32`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
844 pub unsafe fn read_int32(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
845 let __mi = Self::read_int32_method_info();
846 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
847 __inner(this.into(), ::core::option::Option::None)
848 }
849
850 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadUInt32`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
851 pub unsafe fn read_u_int32(this: impl ::core::convert::Into<::unity::IlInstance>) -> u32 {
852 let __mi = Self::read_u_int32_method_info();
853 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> u32 = ::core::mem::transmute(__mi.method_ptr);
854 __inner(this.into(), ::core::option::Option::None)
855 }
856
857 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadInt64`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
858 pub unsafe fn read_int64(this: impl ::core::convert::Into<::unity::IlInstance>) -> i64 {
859 let __mi = Self::read_int64_method_info();
860 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i64 = ::core::mem::transmute(__mi.method_ptr);
861 __inner(this.into(), ::core::option::Option::None)
862 }
863
864 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadUInt64`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
865 pub unsafe fn read_u_int64(this: impl ::core::convert::Into<::unity::IlInstance>) -> u64 {
866 let __mi = Self::read_u_int64_method_info();
867 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> u64 = ::core::mem::transmute(__mi.method_ptr);
868 __inner(this.into(), ::core::option::Option::None)
869 }
870
871 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadSingle`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
872 pub unsafe fn read_single(this: impl ::core::convert::Into<::unity::IlInstance>) -> f32 {
873 let __mi = Self::read_single_method_info();
874 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> f32 = ::core::mem::transmute(__mi.method_ptr);
875 __inner(this.into(), ::core::option::Option::None)
876 }
877
878 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadDouble`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
879 pub unsafe fn read_double(this: impl ::core::convert::Into<::unity::IlInstance>) -> f64 {
880 let __mi = Self::read_double_method_info();
881 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> f64 = ::core::mem::transmute(__mi.method_ptr);
882 __inner(this.into(), ::core::option::Option::None)
883 }
884
885 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
886 pub unsafe fn read_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
887 let __mi = Self::read_string_method_info();
888 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
889 __inner(this.into(), ::core::option::Option::None)
890 }
891
892 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadChars`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
893 pub unsafe fn read_chars(this: impl ::core::convert::Into<::unity::IlInstance>, count: i32) -> ::unity::Array<u16> {
894 let __mi = Self::read_chars_method_info();
895 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> ::unity::Array<u16> =
896 ::core::mem::transmute(__mi.method_ptr);
897 __inner(this.into(), count, ::core::option::Option::None)
898 }
899
900 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
901 pub unsafe fn read_2(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u8>, index: i32, count: i32) -> i32 {
902 let __mi = Self::read_2_method_info();
903 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u8>, i32, i32, ::unity::OptionalMethod) -> i32 =
904 ::core::mem::transmute(__mi.method_ptr);
905 __inner(this.into(), buffer, index, count, ::core::option::Option::None)
906 }
907
908 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `ReadBytes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
909 pub unsafe fn read_bytes(this: impl ::core::convert::Into<::unity::IlInstance>, count: i32) -> ::unity::Array<u8> {
910 let __mi = Self::read_bytes_method_info();
911 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> ::unity::Array<u8> = ::core::mem::transmute(__mi.method_ptr);
912 __inner(this.into(), count, ::core::option::Option::None)
913 }
914
915 #[doc = "Direct (non-virtual) call to `BinaryReader`'s own `FillBuffer`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
916 pub unsafe fn fill_buffer(this: impl ::core::convert::Into<::unity::IlInstance>, num_bytes: i32) -> () {
917 let __mi = Self::fill_buffer_method_info();
918 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
919 __inner(this.into(), num_bytes, ::core::option::Option::None)
920 }
921}
922
923#[cfg(feature = "system-io-binaryreader")]
924impl BinaryReader {
925 #[doc = "`.ctor(crate::system::io::stream::Stream)` — overload selector"]
926 pub fn new(input: crate::system::io::stream::Stream) -> Self {
927 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
928 panic!(
929 "{}
930::{}
931 failed to instantiate",
932 ::core::stringify!(BinaryReader),
933 ::core::stringify!(new),
934 )
935 });
936 <Self as IBinaryReaderMethods>::ctor(this, input);
937 this
938 }
939}
940
941#[cfg(feature = "system-io-binaryreader")]
942#[doc(hidden)]
943pub mod prelude {
944 pub use super::{BinaryReader, IBinaryReader, IBinaryReaderMethods};
945 pub use crate::system::object::IObject;
946 #[cfg(feature = "system-object")]
947 pub use crate::system::object::IObjectMethods;
948}