Skip to main content

engage/generated/system/io/
streamwriter.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-io-streamwriter-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        io::textwriter::{ITextWriter, TextWriter},
10        object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/streamwriter/StreamWriter.md"))]
14    #[::unity::class(namespace = "System.IO", name = "StreamWriter")]
15    #[parent(crate::system::io::textwriter::TextWriter)]
16    pub struct StreamWriter {
17        #[static_field]
18        #[rename(name = "Null")]
19        pub null: crate::system::io::streamwriter::StreamWriter,
20        #[offset(40)]
21        #[rename(name = "stream")]
22        pub stream: crate::system::io::stream::Stream,
23        #[offset(64)]
24        #[rename(name = "byteBuffer")]
25        pub byte_buffer: ::unity::Array<u8>,
26        #[offset(72)]
27        #[rename(name = "charBuffer")]
28        pub char_buffer: ::unity::Array<u16>,
29        #[offset(80)]
30        #[rename(name = "charPos")]
31        pub char_pos: i32,
32        #[offset(84)]
33        #[rename(name = "charLen")]
34        pub char_len: i32,
35        #[offset(88)]
36        #[rename(name = "autoFlush")]
37        pub auto_flush_field: bool,
38        #[offset(89)]
39        #[rename(name = "haveWrittenPreamble")]
40        pub have_written_preamble: bool,
41        #[offset(90)]
42        #[rename(name = "closable")]
43        pub closable: bool,
44        #[static_field]
45        #[rename(name = "_UTF8NoBOM")]
46        pub utf8_no_bom: ::unity::IlInstance,
47    }
48}
49
50#[cfg(feature = "system-io-streamwriter-types")]
51pub use __types::*;
52
53#[cfg(feature = "system-io-streamwriter")]
54impl StreamWriter {
55    #[doc = "`CreateFile(::unity::Il2CppString, bool, bool)` overload"]
56    pub fn create_file(
57        path: impl ::core::convert::Into<::unity::Il2CppString>,
58        append: impl ::core::convert::Into<bool>,
59        check_host: impl ::core::convert::Into<bool>,
60    ) -> crate::system::io::stream::Stream {
61        unsafe {
62            ::unity::il2cpp_call!((::unity::module_base()+0x377e650usize)as*mut u8,crate::system::io::stream::Stream;
63(::unity::Il2CppString)::core::convert::Into::into(path),(bool)::core::convert::Into::into(append),(bool)::core::convert::Into::into(check_host))
64        }
65    }
66
67    #[doc = "`.cctor()` overload"]
68    pub fn cctor() -> () {
69        unsafe {
70            ::unity::il2cpp_call!((::unity::module_base()+0x377f1b0usize)as*mut u8,();
71            )
72        }
73    }
74}
75
76#[cfg(feature = "system-io-streamwriter")]
77pub trait IStreamWriterMethods: IStreamWriter {
78    #[doc = "`CheckAsyncTaskInProgress()` overload"]
79    fn check_async_task_in_progress(self) -> () {
80        unsafe {
81            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
82            ::unity::il2cpp_call!((::unity::module_base()+0x377ddc0usize)as*mut u8,();
83(StreamWriter)__receiver)
84        }
85    }
86    #[doc = "`.ctor()` overload"]
87    fn ctor(self) -> () {
88        unsafe {
89            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90            ::unity::il2cpp_call!((::unity::module_base()+0x377df70usize)as*mut u8,();
91(StreamWriter)__receiver)
92        }
93    }
94    #[doc = "`.ctor(crate::system::io::stream::Stream)` overload"]
95    fn ctor_2(self, stream: impl ::core::convert::Into<crate::system::io::stream::Stream>) -> () {
96        unsafe {
97            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
98            ::unity::il2cpp_call!((::unity::module_base()+0x377dfe0usize)as*mut u8,();
99(StreamWriter)__receiver,(crate::system::io::stream::Stream)::core::convert::Into::into(stream))
100        }
101    }
102    #[doc = "`.ctor(::unity::Il2CppString)` overload"]
103    fn ctor_3(self, path: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
104        unsafe {
105            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
106            ::unity::il2cpp_call!((::unity::module_base()+0x377e390usize)as*mut u8,();
107(StreamWriter)__receiver,(::unity::Il2CppString)::core::convert::Into::into(path))
108        }
109    }
110    #[doc = "`Close()` overload"]
111    fn close(self) -> () {
112        unsafe {
113            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
114            {
115                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
116                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
117                    panic!(
118                        "unity: virtual slot {}
119 out of range (vtable len {}
120) on the runtime class behind {}
121 (method `{}
122`)",
123                        8usize,
124                        __vt.len(),
125                        <StreamWriter as ::unity::ClassIdentity>::NAME,
126                        "Close",
127                    )
128                });
129                let __inner: extern "C" fn(StreamWriter, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
130                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
131                __inner(__receiver, __mi)
132            }
133        }
134    }
135    #[doc = "`Dispose(bool)` overload"]
136    fn dispose(self, disposing: impl ::core::convert::Into<bool>) -> () {
137        unsafe {
138            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
139            {
140                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
141                let __vi = *__vt.get(9usize).unwrap_or_else(|| {
142                    panic!(
143                        "unity: virtual slot {}
144 out of range (vtable len {}
145) on the runtime class behind {}
146 (method `{}
147`)",
148                        9usize,
149                        __vt.len(),
150                        <StreamWriter as ::unity::ClassIdentity>::NAME,
151                        "Dispose",
152                    )
153                });
154                let __inner: extern "C" fn(StreamWriter, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
155                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
156                __inner(__receiver, ::core::convert::Into::into(disposing), __mi)
157            }
158        }
159    }
160    #[doc = "`Flush()` overload"]
161    fn flush(self) -> () {
162        unsafe {
163            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
164            {
165                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
166                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
167                    panic!(
168                        "unity: virtual slot {}
169 out of range (vtable len {}
170) on the runtime class behind {}
171 (method `{}
172`)",
173                        10usize,
174                        __vt.len(),
175                        <StreamWriter as ::unity::ClassIdentity>::NAME,
176                        "Flush",
177                    )
178                });
179                let __inner: extern "C" fn(StreamWriter, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
180                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
181                __inner(__receiver, __mi)
182            }
183        }
184    }
185    #[doc = "`Flush(bool, bool)` overload"]
186    fn flush_2(self, flush_stream: impl ::core::convert::Into<bool>, flush_encoder: impl ::core::convert::Into<bool>) -> () {
187        unsafe {
188            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
189            ::unity::il2cpp_call!((::unity::module_base()+0x377e990usize)as*mut u8,();
190(StreamWriter)__receiver,(bool)::core::convert::Into::into(flush_stream),(bool)::core::convert::Into::into(flush_encoder))
191        }
192    }
193    #[doc = "`set_AutoFlush(bool)` overload"]
194    fn set_auto_flush(self, value: impl ::core::convert::Into<bool>) -> () {
195        unsafe {
196            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
197            {
198                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
199                let __vi = *__vt.get(22usize).unwrap_or_else(|| {
200                    panic!(
201                        "unity: virtual slot {}
202 out of range (vtable len {}
203) on the runtime class behind {}
204 (method `{}
205`)",
206                        22usize,
207                        __vt.len(),
208                        <StreamWriter as ::unity::ClassIdentity>::NAME,
209                        "set_AutoFlush",
210                    )
211                });
212                let __inner: extern "C" fn(StreamWriter, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
213                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
214                __inner(__receiver, ::core::convert::Into::into(value), __mi)
215            }
216        }
217    }
218    #[doc = "`get_LeaveOpen()` overload"]
219    fn get_leave_open(self) -> bool {
220        unsafe {
221            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
222            ::unity::il2cpp_call!((::unity::module_base()+0x377e980usize)as*mut u8,bool;
223(StreamWriter)__receiver)
224        }
225    }
226    #[doc = "`Write(u16)` overload"]
227    fn write(self, value: impl ::core::convert::Into<u16>) -> () {
228        unsafe {
229            let __receiver = <StreamWriter 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(12usize).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                        12usize,
240                        __vt.len(),
241                        <StreamWriter as ::unity::ClassIdentity>::NAME,
242                        "Write",
243                    )
244                });
245                let __inner: extern "C" fn(StreamWriter, u16, ::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 = "`Write(::unity::Array<u16>)` overload"]
252    fn write_2(self, buffer: impl ::core::convert::Into<::unity::Array<u16>>) -> () {
253        unsafe {
254            let __receiver = <StreamWriter 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(13usize).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                        13usize,
265                        __vt.len(),
266                        <StreamWriter as ::unity::ClassIdentity>::NAME,
267                        "Write",
268                    )
269                });
270                let __inner: extern "C" fn(StreamWriter, ::unity::Array<u16>, ::unity::OptionalMethod) -> () =
271                    ::core::mem::transmute(__vi.method_ptr);
272                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
273                __inner(__receiver, ::core::convert::Into::into(buffer), __mi)
274            }
275        }
276    }
277    #[doc = "`Write(::unity::Array<u16>, i32, i32)` overload"]
278    fn write_3(
279        self,
280        buffer: impl ::core::convert::Into<::unity::Array<u16>>,
281        index: impl ::core::convert::Into<i32>,
282        count: impl ::core::convert::Into<i32>,
283    ) -> () {
284        unsafe {
285            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
286            {
287                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
288                let __vi = *__vt.get(14usize).unwrap_or_else(|| {
289                    panic!(
290                        "unity: virtual slot {}
291 out of range (vtable len {}
292) on the runtime class behind {}
293 (method `{}
294`)",
295                        14usize,
296                        __vt.len(),
297                        <StreamWriter as ::unity::ClassIdentity>::NAME,
298                        "Write",
299                    )
300                });
301                let __inner: extern "C" fn(StreamWriter, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> () =
302                    ::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(
305                    __receiver,
306                    ::core::convert::Into::into(buffer),
307                    ::core::convert::Into::into(index),
308                    ::core::convert::Into::into(count),
309                    __mi,
310                )
311            }
312        }
313    }
314    #[doc = "`Write(::unity::Il2CppString)` overload"]
315    fn write_4(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
316        unsafe {
317            let __receiver = <StreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
318            {
319                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
320                let __vi = *__vt.get(15usize).unwrap_or_else(|| {
321                    panic!(
322                        "unity: virtual slot {}
323 out of range (vtable len {}
324) on the runtime class behind {}
325 (method `{}
326`)",
327                        15usize,
328                        __vt.len(),
329                        <StreamWriter as ::unity::ClassIdentity>::NAME,
330                        "Write",
331                    )
332                });
333                let __inner: extern "C" fn(StreamWriter, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
334                    ::core::mem::transmute(__vi.method_ptr);
335                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
336                __inner(__receiver, ::core::convert::Into::into(value), __mi)
337            }
338        }
339    }
340}
341
342#[cfg(feature = "system-io-streamwriter")]
343impl<__T: IStreamWriter> IStreamWriterMethods for __T {}
344
345#[cfg(feature = "system-io-streamwriter")]
346impl StreamWriter {
347    pub fn check_async_task_in_progress_method_info() -> &'static ::unity::il2cpp::MethodInfo {
348        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
349    }
350
351    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
352        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
353    }
354
355    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
356        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
357    }
358
359    pub fn ctor_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
360        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
361    }
362
363    pub fn create_file_method_info() -> &'static ::unity::il2cpp::MethodInfo {
364        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
365    }
366
367    pub fn close_method_info() -> &'static ::unity::il2cpp::MethodInfo {
368        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
369    }
370
371    pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
372        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
373    }
374
375    pub fn flush_method_info() -> &'static ::unity::il2cpp::MethodInfo {
376        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
377    }
378
379    pub fn flush_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
380        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
381    }
382
383    pub fn set_auto_flush_method_info() -> &'static ::unity::il2cpp::MethodInfo {
384        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
385    }
386
387    pub fn get_leave_open_method_info() -> &'static ::unity::il2cpp::MethodInfo {
388        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
389    }
390
391    pub fn write_method_info() -> &'static ::unity::il2cpp::MethodInfo {
392        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
393    }
394
395    pub fn write_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
396        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
397    }
398
399    pub fn write_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
400        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
401    }
402
403    pub fn write_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
404        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
405    }
406
407    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
408        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
409    }
410}
411
412#[cfg(feature = "system-io-streamwriter")]
413impl StreamWriter {
414    #[doc = "Direct (non-virtual) call to `StreamWriter`'s own `Close`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
415    pub unsafe fn close(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
416        let __mi = Self::close_method_info();
417        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
418        __inner(this.into(), ::core::option::Option::None)
419    }
420
421    #[doc = "Direct (non-virtual) call to `StreamWriter`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
422    pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>, disposing: bool) -> () {
423        let __mi = Self::dispose_method_info();
424        let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
425        __inner(this.into(), disposing, ::core::option::Option::None)
426    }
427
428    #[doc = "Direct (non-virtual) call to `StreamWriter`'s own `Flush`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
429    pub unsafe fn flush(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
430        let __mi = Self::flush_method_info();
431        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
432        __inner(this.into(), ::core::option::Option::None)
433    }
434
435    #[doc = "Direct (non-virtual) call to `StreamWriter`'s own `set_AutoFlush`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
436    pub unsafe fn set_auto_flush(this: impl ::core::convert::Into<::unity::IlInstance>, value: bool) -> () {
437        let __mi = Self::set_auto_flush_method_info();
438        let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
439        __inner(this.into(), value, ::core::option::Option::None)
440    }
441
442    #[doc = "Direct (non-virtual) call to `StreamWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
443    pub unsafe fn write(this: impl ::core::convert::Into<::unity::IlInstance>, value: u16) -> () {
444        let __mi = Self::write_method_info();
445        let __inner: extern "C" fn(::unity::IlInstance, u16, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
446        __inner(this.into(), value, ::core::option::Option::None)
447    }
448
449    #[doc = "Direct (non-virtual) call to `StreamWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
450    pub unsafe fn write_2(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>) -> () {
451        let __mi = Self::write_2_method_info();
452        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
453        __inner(this.into(), buffer, ::core::option::Option::None)
454    }
455
456    #[doc = "Direct (non-virtual) call to `StreamWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
457    pub unsafe fn write_3(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> () {
458        let __mi = Self::write_3_method_info();
459        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> () =
460            ::core::mem::transmute(__mi.method_ptr);
461        __inner(this.into(), buffer, index, count, ::core::option::Option::None)
462    }
463
464    #[doc = "Direct (non-virtual) call to `StreamWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
465    pub unsafe fn write_4(this: impl ::core::convert::Into<::unity::IlInstance>, value: ::unity::Il2CppString) -> () {
466        let __mi = Self::write_4_method_info();
467        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
468            ::core::mem::transmute(__mi.method_ptr);
469        __inner(this.into(), value, ::core::option::Option::None)
470    }
471}
472
473#[cfg(feature = "system-io-streamwriter")]
474impl StreamWriter {
475    #[doc = "`.ctor()` — no args"]
476    pub fn new() -> Self {
477        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
478            panic!(
479                "{}
480::{}
481 failed to instantiate",
482                ::core::stringify!(StreamWriter),
483                ::core::stringify!(new),
484            )
485        });
486        <Self as IStreamWriterMethods>::ctor(this);
487        this
488    }
489
490    #[doc = "`.ctor(crate::system::io::stream::Stream)` — overload selector"]
491    pub fn new_2(stream: crate::system::io::stream::Stream) -> Self {
492        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
493            panic!(
494                "{}
495::{}
496 failed to instantiate",
497                ::core::stringify!(StreamWriter),
498                ::core::stringify!(new_2),
499            )
500        });
501        <Self as IStreamWriterMethods>::ctor_2(this, stream);
502        this
503    }
504
505    #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
506    pub fn new_3(path: ::unity::Il2CppString) -> Self {
507        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
508            panic!(
509                "{}
510::{}
511 failed to instantiate",
512                ::core::stringify!(StreamWriter),
513                ::core::stringify!(new_3),
514            )
515        });
516        <Self as IStreamWriterMethods>::ctor_3(this, path);
517        this
518    }
519}
520
521#[cfg(feature = "system-io-streamwriter")]
522#[doc(hidden)]
523pub mod prelude {
524    pub use super::{IStreamWriter, IStreamWriterMethods, StreamWriter};
525    #[cfg(feature = "system-io-textwriter")]
526    pub use crate::system::io::textwriter::ITextWriterMethods;
527    #[cfg(feature = "system-object")]
528    pub use crate::system::object::IObjectMethods;
529    pub use crate::system::{io::textwriter::ITextWriter, object::IObject};
530}