1#[cfg(feature = "system-io-unmanagedmemorystream-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 io::stream::{IStream, Stream},
10 object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/unmanagedmemorystream/UnmanagedMemoryStream.md"))]
14 #[::unity::class(namespace = "System.IO", name = "UnmanagedMemoryStream")]
15 #[parent(crate::system::io::stream::Stream)]
16 pub struct UnmanagedMemoryStream {
17 #[offset(56)]
18 #[rename(name = "_length")]
19 pub length_field: i64,
20 #[offset(64)]
21 #[rename(name = "_capacity")]
22 pub capacity: i64,
23 #[offset(72)]
24 #[rename(name = "_position")]
25 pub position_field: i64,
26 #[offset(80)]
27 #[rename(name = "_offset")]
28 pub offset: i64,
29 #[offset(88)]
30 #[rename(name = "_access")]
31 pub access: crate::system::io::fileaccess::FileAccess,
32 #[offset(92)]
33 #[rename(name = "_isOpen")]
34 pub is_open: bool,
35 }
36}
37
38#[cfg(feature = "system-io-unmanagedmemorystream-types")]
39pub use __types::*;
40
41#[cfg(feature = "system-io-unmanagedmemorystream")]
42pub trait IUnmanagedMemoryStreamMethods: IUnmanagedMemoryStream {
43 #[doc = "`.ctor()` overload"]
44 fn ctor(self) -> () {
45 unsafe {
46 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
47 ::unity::il2cpp_call!((::unity::module_base()+0x3352450usize)as*mut u8,();
48(UnmanagedMemoryStream)__receiver)
49 }
50 }
51 #[doc = "`get_CanRead()` overload"]
52 fn get_can_read(self) -> bool {
53 unsafe {
54 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
55 {
56 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
57 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
58 panic!(
59 "unity: virtual slot {}
60 out of range (vtable len {}
61) on the runtime class behind {}
62 (method `{}
63`)",
64 7usize,
65 __vt.len(),
66 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
67 "get_CanRead",
68 )
69 });
70 let __inner: extern "C" fn(UnmanagedMemoryStream, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
71 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
72 __inner(__receiver, __mi)
73 }
74 }
75 }
76 #[doc = "`get_CanSeek()` overload"]
77 fn get_can_seek(self) -> bool {
78 unsafe {
79 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
80 {
81 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
82 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
83 panic!(
84 "unity: virtual slot {}
85 out of range (vtable len {}
86) on the runtime class behind {}
87 (method `{}
88`)",
89 8usize,
90 __vt.len(),
91 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
92 "get_CanSeek",
93 )
94 });
95 let __inner: extern "C" fn(UnmanagedMemoryStream, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
96 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
97 __inner(__receiver, __mi)
98 }
99 }
100 }
101 #[doc = "`get_CanWrite()` overload"]
102 fn get_can_write(self) -> bool {
103 unsafe {
104 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
105 {
106 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
107 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
108 panic!(
109 "unity: virtual slot {}
110 out of range (vtable len {}
111) on the runtime class behind {}
112 (method `{}
113`)",
114 10usize,
115 __vt.len(),
116 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
117 "get_CanWrite",
118 )
119 });
120 let __inner: extern "C" fn(UnmanagedMemoryStream, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
121 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
122 __inner(__receiver, __mi)
123 }
124 }
125 }
126 #[doc = "`Dispose(bool)` overload"]
127 fn dispose(self, disposing: impl ::core::convert::Into<bool>) -> () {
128 unsafe {
129 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
130 {
131 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
132 let __vi = *__vt.get(19usize).unwrap_or_else(|| {
133 panic!(
134 "unity: virtual slot {}
135 out of range (vtable len {}
136) on the runtime class behind {}
137 (method `{}
138`)",
139 19usize,
140 __vt.len(),
141 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
142 "Dispose",
143 )
144 });
145 let __inner: extern "C" fn(UnmanagedMemoryStream, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
146 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
147 __inner(__receiver, ::core::convert::Into::into(disposing), __mi)
148 }
149 }
150 }
151 #[doc = "`Flush()` overload"]
152 fn flush(self) -> () {
153 unsafe {
154 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
155 {
156 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
157 let __vi = *__vt.get(20usize).unwrap_or_else(|| {
158 panic!(
159 "unity: virtual slot {}
160 out of range (vtable len {}
161) on the runtime class behind {}
162 (method `{}
163`)",
164 20usize,
165 __vt.len(),
166 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
167 "Flush",
168 )
169 });
170 let __inner: extern "C" fn(UnmanagedMemoryStream, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
171 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
172 __inner(__receiver, __mi)
173 }
174 }
175 }
176 #[doc = "`get_Length()` overload"]
177 fn get_length(self) -> i64 {
178 unsafe {
179 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
180 {
181 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
182 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
183 panic!(
184 "unity: virtual slot {}
185 out of range (vtable len {}
186) on the runtime class behind {}
187 (method `{}
188`)",
189 11usize,
190 __vt.len(),
191 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
192 "get_Length",
193 )
194 });
195 let __inner: extern "C" fn(UnmanagedMemoryStream, ::unity::OptionalMethod) -> i64 = ::core::mem::transmute(__vi.method_ptr);
196 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
197 __inner(__receiver, __mi)
198 }
199 }
200 }
201 #[doc = "`get_Position()` overload"]
202 fn get_position(self) -> i64 {
203 unsafe {
204 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
205 {
206 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
207 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
208 panic!(
209 "unity: virtual slot {}
210 out of range (vtable len {}
211) on the runtime class behind {}
212 (method `{}
213`)",
214 12usize,
215 __vt.len(),
216 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
217 "get_Position",
218 )
219 });
220 let __inner: extern "C" fn(UnmanagedMemoryStream, ::unity::OptionalMethod) -> i64 = ::core::mem::transmute(__vi.method_ptr);
221 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
222 __inner(__receiver, __mi)
223 }
224 }
225 }
226 #[doc = "`set_Position(i64)` overload"]
227 fn set_position(self, value: impl ::core::convert::Into<i64>) -> () {
228 unsafe {
229 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
230 {
231 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
232 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
233 panic!(
234 "unity: virtual slot {}
235 out of range (vtable len {}
236) on the runtime class behind {}
237 (method `{}
238`)",
239 13usize,
240 __vt.len(),
241 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
242 "set_Position",
243 )
244 });
245 let __inner: extern "C" fn(UnmanagedMemoryStream, i64, ::unity::OptionalMethod) -> () = ::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 = "`Read(::unity::Array<u8>, i32, i32)` overload"]
252 fn read(
253 self,
254 buffer: impl ::core::convert::Into<::unity::Array<u8>>,
255 offset: impl ::core::convert::Into<i32>,
256 count: impl ::core::convert::Into<i32>,
257 ) -> i32 {
258 unsafe {
259 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
260 {
261 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
262 let __vi = *__vt.get(29usize).unwrap_or_else(|| {
263 panic!(
264 "unity: virtual slot {}
265 out of range (vtable len {}
266) on the runtime class behind {}
267 (method `{}
268`)",
269 29usize,
270 __vt.len(),
271 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
272 "Read",
273 )
274 });
275 let __inner: extern "C" fn(UnmanagedMemoryStream, ::unity::Array<u8>, i32, i32, ::unity::OptionalMethod) -> i32 =
276 ::core::mem::transmute(__vi.method_ptr);
277 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
278 __inner(
279 __receiver,
280 ::core::convert::Into::into(buffer),
281 ::core::convert::Into::into(offset),
282 ::core::convert::Into::into(count),
283 __mi,
284 )
285 }
286 }
287 }
288 #[doc = "`ReadByte()` overload"]
289 fn read_byte(self) -> i32 {
290 unsafe {
291 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
292 {
293 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
294 let __vi = *__vt.get(30usize).unwrap_or_else(|| {
295 panic!(
296 "unity: virtual slot {}
297 out of range (vtable len {}
298) on the runtime class behind {}
299 (method `{}
300`)",
301 30usize,
302 __vt.len(),
303 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
304 "ReadByte",
305 )
306 });
307 let __inner: extern "C" fn(UnmanagedMemoryStream, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
308 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
309 __inner(__receiver, __mi)
310 }
311 }
312 }
313 #[doc = "`Seek(i64, crate::system::io::seekorigin::SeekOrigin)` overload"]
314 fn seek(self, offset: impl ::core::convert::Into<i64>, loc: impl ::core::convert::Into<crate::system::io::seekorigin::SeekOrigin>) -> i64 {
315 unsafe {
316 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
317 {
318 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
319 let __vi = *__vt.get(27usize).unwrap_or_else(|| {
320 panic!(
321 "unity: virtual slot {}
322 out of range (vtable len {}
323) on the runtime class behind {}
324 (method `{}
325`)",
326 27usize,
327 __vt.len(),
328 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
329 "Seek",
330 )
331 });
332 let __inner: extern "C" fn(UnmanagedMemoryStream, i64, crate::system::io::seekorigin::SeekOrigin, ::unity::OptionalMethod) -> i64 =
333 ::core::mem::transmute(__vi.method_ptr);
334 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
335 __inner(__receiver, ::core::convert::Into::into(offset), ::core::convert::Into::into(loc), __mi)
336 }
337 }
338 }
339 #[doc = "`SetLength(i64)` overload"]
340 fn set_length(self, value: impl ::core::convert::Into<i64>) -> () {
341 unsafe {
342 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
343 {
344 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
345 let __vi = *__vt.get(28usize).unwrap_or_else(|| {
346 panic!(
347 "unity: virtual slot {}
348 out of range (vtable len {}
349) on the runtime class behind {}
350 (method `{}
351`)",
352 28usize,
353 __vt.len(),
354 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
355 "SetLength",
356 )
357 });
358 let __inner: extern "C" fn(UnmanagedMemoryStream, i64, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
359 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
360 __inner(__receiver, ::core::convert::Into::into(value), __mi)
361 }
362 }
363 }
364 #[doc = "`Write(::unity::Array<u8>, i32, i32)` overload"]
365 fn write(
366 self,
367 buffer: impl ::core::convert::Into<::unity::Array<u8>>,
368 offset: impl ::core::convert::Into<i32>,
369 count: impl ::core::convert::Into<i32>,
370 ) -> () {
371 unsafe {
372 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
373 {
374 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
375 let __vi = *__vt.get(31usize).unwrap_or_else(|| {
376 panic!(
377 "unity: virtual slot {}
378 out of range (vtable len {}
379) on the runtime class behind {}
380 (method `{}
381`)",
382 31usize,
383 __vt.len(),
384 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
385 "Write",
386 )
387 });
388 let __inner: extern "C" fn(UnmanagedMemoryStream, ::unity::Array<u8>, i32, i32, ::unity::OptionalMethod) -> () =
389 ::core::mem::transmute(__vi.method_ptr);
390 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
391 __inner(
392 __receiver,
393 ::core::convert::Into::into(buffer),
394 ::core::convert::Into::into(offset),
395 ::core::convert::Into::into(count),
396 __mi,
397 )
398 }
399 }
400 }
401 #[doc = "`WriteByte(u8)` overload"]
402 fn write_byte(self, value: impl ::core::convert::Into<u8>) -> () {
403 unsafe {
404 let __receiver = <UnmanagedMemoryStream as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
405 {
406 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
407 let __vi = *__vt.get(32usize).unwrap_or_else(|| {
408 panic!(
409 "unity: virtual slot {}
410 out of range (vtable len {}
411) on the runtime class behind {}
412 (method `{}
413`)",
414 32usize,
415 __vt.len(),
416 <UnmanagedMemoryStream as ::unity::ClassIdentity>::NAME,
417 "WriteByte",
418 )
419 });
420 let __inner: extern "C" fn(UnmanagedMemoryStream, u8, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
421 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
422 __inner(__receiver, ::core::convert::Into::into(value), __mi)
423 }
424 }
425 }
426}
427
428#[cfg(feature = "system-io-unmanagedmemorystream")]
429impl<__T: IUnmanagedMemoryStream> IUnmanagedMemoryStreamMethods for __T {}
430
431#[cfg(feature = "system-io-unmanagedmemorystream")]
432impl UnmanagedMemoryStream {
433 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
434 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
435 }
436
437 pub fn get_can_read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
438 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
439 }
440
441 pub fn get_can_seek_method_info() -> &'static ::unity::il2cpp::MethodInfo {
442 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
443 }
444
445 pub fn get_can_write_method_info() -> &'static ::unity::il2cpp::MethodInfo {
446 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
447 }
448
449 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
450 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
451 }
452
453 pub fn flush_method_info() -> &'static ::unity::il2cpp::MethodInfo {
454 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
455 }
456
457 pub fn get_length_method_info() -> &'static ::unity::il2cpp::MethodInfo {
458 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
459 }
460
461 pub fn get_position_method_info() -> &'static ::unity::il2cpp::MethodInfo {
462 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
463 }
464
465 pub fn set_position_method_info() -> &'static ::unity::il2cpp::MethodInfo {
466 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
467 }
468
469 pub fn read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
470 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
471 }
472
473 pub fn read_byte_method_info() -> &'static ::unity::il2cpp::MethodInfo {
474 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
475 }
476
477 pub fn seek_method_info() -> &'static ::unity::il2cpp::MethodInfo {
478 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
479 }
480
481 pub fn set_length_method_info() -> &'static ::unity::il2cpp::MethodInfo {
482 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
483 }
484
485 pub fn write_method_info() -> &'static ::unity::il2cpp::MethodInfo {
486 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
487 }
488
489 pub fn write_byte_method_info() -> &'static ::unity::il2cpp::MethodInfo {
490 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
491 }
492}
493
494#[cfg(feature = "system-io-unmanagedmemorystream")]
495impl UnmanagedMemoryStream {
496 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `get_CanRead`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
497 pub unsafe fn get_can_read(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
498 let __mi = Self::get_can_read_method_info();
499 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
500 __inner(this.into(), ::core::option::Option::None)
501 }
502
503 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `get_CanSeek`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
504 pub unsafe fn get_can_seek(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
505 let __mi = Self::get_can_seek_method_info();
506 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
507 __inner(this.into(), ::core::option::Option::None)
508 }
509
510 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `get_CanWrite`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
511 pub unsafe fn get_can_write(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
512 let __mi = Self::get_can_write_method_info();
513 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
514 __inner(this.into(), ::core::option::Option::None)
515 }
516
517 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
518 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>, disposing: bool) -> () {
519 let __mi = Self::dispose_method_info();
520 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
521 __inner(this.into(), disposing, ::core::option::Option::None)
522 }
523
524 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `Flush`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
525 pub unsafe fn flush(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
526 let __mi = Self::flush_method_info();
527 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
528 __inner(this.into(), ::core::option::Option::None)
529 }
530
531 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `get_Length`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
532 pub unsafe fn get_length(this: impl ::core::convert::Into<::unity::IlInstance>) -> i64 {
533 let __mi = Self::get_length_method_info();
534 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i64 = ::core::mem::transmute(__mi.method_ptr);
535 __inner(this.into(), ::core::option::Option::None)
536 }
537
538 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `get_Position`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
539 pub unsafe fn get_position(this: impl ::core::convert::Into<::unity::IlInstance>) -> i64 {
540 let __mi = Self::get_position_method_info();
541 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i64 = ::core::mem::transmute(__mi.method_ptr);
542 __inner(this.into(), ::core::option::Option::None)
543 }
544
545 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `set_Position`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
546 pub unsafe fn set_position(this: impl ::core::convert::Into<::unity::IlInstance>, value: i64) -> () {
547 let __mi = Self::set_position_method_info();
548 let __inner: extern "C" fn(::unity::IlInstance, i64, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
549 __inner(this.into(), value, ::core::option::Option::None)
550 }
551
552 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
553 pub unsafe fn read(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u8>, offset: i32, count: i32) -> i32 {
554 let __mi = Self::read_method_info();
555 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u8>, i32, i32, ::unity::OptionalMethod) -> i32 =
556 ::core::mem::transmute(__mi.method_ptr);
557 __inner(this.into(), buffer, offset, count, ::core::option::Option::None)
558 }
559
560 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `ReadByte`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
561 pub unsafe fn read_byte(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
562 let __mi = Self::read_byte_method_info();
563 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
564 __inner(this.into(), ::core::option::Option::None)
565 }
566
567 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `Seek`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
568 pub unsafe fn seek(this: impl ::core::convert::Into<::unity::IlInstance>, offset: i64, loc: crate::system::io::seekorigin::SeekOrigin) -> i64 {
569 let __mi = Self::seek_method_info();
570 let __inner: extern "C" fn(::unity::IlInstance, i64, crate::system::io::seekorigin::SeekOrigin, ::unity::OptionalMethod) -> i64 =
571 ::core::mem::transmute(__mi.method_ptr);
572 __inner(this.into(), offset, loc, ::core::option::Option::None)
573 }
574
575 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `SetLength`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
576 pub unsafe fn set_length(this: impl ::core::convert::Into<::unity::IlInstance>, value: i64) -> () {
577 let __mi = Self::set_length_method_info();
578 let __inner: extern "C" fn(::unity::IlInstance, i64, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
579 __inner(this.into(), value, ::core::option::Option::None)
580 }
581
582 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
583 pub unsafe fn write(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u8>, offset: i32, count: i32) -> () {
584 let __mi = Self::write_method_info();
585 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u8>, i32, i32, ::unity::OptionalMethod) -> () =
586 ::core::mem::transmute(__mi.method_ptr);
587 __inner(this.into(), buffer, offset, count, ::core::option::Option::None)
588 }
589
590 #[doc = "Direct (non-virtual) call to `UnmanagedMemoryStream`'s own `WriteByte`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
591 pub unsafe fn write_byte(this: impl ::core::convert::Into<::unity::IlInstance>, value: u8) -> () {
592 let __mi = Self::write_byte_method_info();
593 let __inner: extern "C" fn(::unity::IlInstance, u8, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
594 __inner(this.into(), value, ::core::option::Option::None)
595 }
596}
597
598#[cfg(feature = "system-io-unmanagedmemorystream")]
599impl UnmanagedMemoryStream {
600 #[doc = "`.ctor()` — no args"]
601 pub fn new() -> Self {
602 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
603 panic!(
604 "{}
605::{}
606 failed to instantiate",
607 ::core::stringify!(UnmanagedMemoryStream),
608 ::core::stringify!(new),
609 )
610 });
611 <Self as IUnmanagedMemoryStreamMethods>::ctor(this);
612 this
613 }
614}
615
616#[cfg(feature = "system-io-unmanagedmemorystream")]
617#[doc(hidden)]
618pub mod prelude {
619 pub use super::{IUnmanagedMemoryStream, IUnmanagedMemoryStreamMethods, UnmanagedMemoryStream};
620 #[cfg(feature = "system-io-stream")]
621 pub use crate::system::io::stream::IStreamMethods;
622 #[cfg(feature = "system-object")]
623 pub use crate::system::object::IObjectMethods;
624 pub use crate::system::{io::stream::IStream, object::IObject};
625}