Skip to main content

engage/generated/system/io/
unexceptionalstreamwriter.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-io-unexceptionalstreamwriter-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        io::{
10            streamwriter::{IStreamWriter, StreamWriter},
11            textwriter::{ITextWriter, TextWriter},
12        },
13        object::{IObject, Object},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/unexceptionalstreamwriter/UnexceptionalStreamWriter.md"))]
17    #[::unity::class(namespace = "System.IO", name = "UnexceptionalStreamWriter")]
18    #[parent(crate::system::io::streamwriter::StreamWriter)]
19    pub struct UnexceptionalStreamWriter {}
20}
21
22#[cfg(feature = "system-io-unexceptionalstreamwriter-types")]
23pub use __types::*;
24
25#[cfg(feature = "system-io-unexceptionalstreamwriter")]
26pub trait IUnexceptionalStreamWriterMethods: IUnexceptionalStreamWriter {
27    #[doc = "`Flush()` overload"]
28    fn flush(self) -> () {
29        unsafe {
30            let __receiver =
31                <UnexceptionalStreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
32            {
33                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
34                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
35                    panic!(
36                        "unity: virtual slot {}
37 out of range (vtable len {}
38) on the runtime class behind {}
39 (method `{}
40`)",
41                        10usize,
42                        __vt.len(),
43                        <UnexceptionalStreamWriter as ::unity::ClassIdentity>::NAME,
44                        "Flush",
45                    )
46                });
47                let __inner: extern "C" fn(UnexceptionalStreamWriter, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
48                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
49                __inner(__receiver, __mi)
50            }
51        }
52    }
53    #[doc = "`Write(::unity::Array<u16>, i32, i32)` overload"]
54    fn write(
55        self,
56        buffer: impl ::core::convert::Into<::unity::Array<u16>>,
57        index: impl ::core::convert::Into<i32>,
58        count: impl ::core::convert::Into<i32>,
59    ) -> () {
60        unsafe {
61            let __receiver =
62                <UnexceptionalStreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
63            {
64                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
65                let __vi = *__vt.get(14usize).unwrap_or_else(|| {
66                    panic!(
67                        "unity: virtual slot {}
68 out of range (vtable len {}
69) on the runtime class behind {}
70 (method `{}
71`)",
72                        14usize,
73                        __vt.len(),
74                        <UnexceptionalStreamWriter as ::unity::ClassIdentity>::NAME,
75                        "Write",
76                    )
77                });
78                let __inner: extern "C" fn(UnexceptionalStreamWriter, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> () =
79                    ::core::mem::transmute(__vi.method_ptr);
80                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
81                __inner(
82                    __receiver,
83                    ::core::convert::Into::into(buffer),
84                    ::core::convert::Into::into(index),
85                    ::core::convert::Into::into(count),
86                    __mi,
87                )
88            }
89        }
90    }
91    #[doc = "`Write(u16)` overload"]
92    fn write_2(self, value: impl ::core::convert::Into<u16>) -> () {
93        unsafe {
94            let __receiver =
95                <UnexceptionalStreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
96            {
97                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
98                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
99                    panic!(
100                        "unity: virtual slot {}
101 out of range (vtable len {}
102) on the runtime class behind {}
103 (method `{}
104`)",
105                        12usize,
106                        __vt.len(),
107                        <UnexceptionalStreamWriter as ::unity::ClassIdentity>::NAME,
108                        "Write",
109                    )
110                });
111                let __inner: extern "C" fn(UnexceptionalStreamWriter, u16, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
112                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
113                __inner(__receiver, ::core::convert::Into::into(value), __mi)
114            }
115        }
116    }
117    #[doc = "`Write(::unity::Array<u16>)` overload"]
118    fn write_3(self, value: impl ::core::convert::Into<::unity::Array<u16>>) -> () {
119        unsafe {
120            let __receiver =
121                <UnexceptionalStreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122            {
123                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
124                let __vi = *__vt.get(13usize).unwrap_or_else(|| {
125                    panic!(
126                        "unity: virtual slot {}
127 out of range (vtable len {}
128) on the runtime class behind {}
129 (method `{}
130`)",
131                        13usize,
132                        __vt.len(),
133                        <UnexceptionalStreamWriter as ::unity::ClassIdentity>::NAME,
134                        "Write",
135                    )
136                });
137                let __inner: extern "C" fn(UnexceptionalStreamWriter, ::unity::Array<u16>, ::unity::OptionalMethod) -> () =
138                    ::core::mem::transmute(__vi.method_ptr);
139                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
140                __inner(__receiver, ::core::convert::Into::into(value), __mi)
141            }
142        }
143    }
144    #[doc = "`Write(::unity::Il2CppString)` overload"]
145    fn write_4(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
146        unsafe {
147            let __receiver =
148                <UnexceptionalStreamWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
149            {
150                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
151                let __vi = *__vt.get(15usize).unwrap_or_else(|| {
152                    panic!(
153                        "unity: virtual slot {}
154 out of range (vtable len {}
155) on the runtime class behind {}
156 (method `{}
157`)",
158                        15usize,
159                        __vt.len(),
160                        <UnexceptionalStreamWriter as ::unity::ClassIdentity>::NAME,
161                        "Write",
162                    )
163                });
164                let __inner: extern "C" fn(UnexceptionalStreamWriter, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
165                    ::core::mem::transmute(__vi.method_ptr);
166                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
167                __inner(__receiver, ::core::convert::Into::into(value), __mi)
168            }
169        }
170    }
171}
172
173#[cfg(feature = "system-io-unexceptionalstreamwriter")]
174impl<__T: IUnexceptionalStreamWriter> IUnexceptionalStreamWriterMethods for __T {}
175
176#[cfg(feature = "system-io-unexceptionalstreamwriter")]
177impl UnexceptionalStreamWriter {
178    pub fn flush_method_info() -> &'static ::unity::il2cpp::MethodInfo {
179        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
180    }
181
182    pub fn write_method_info() -> &'static ::unity::il2cpp::MethodInfo {
183        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
184    }
185
186    pub fn write_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
187        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
188    }
189
190    pub fn write_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
191        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
192    }
193
194    pub fn write_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
195        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
196    }
197}
198
199#[cfg(feature = "system-io-unexceptionalstreamwriter")]
200impl UnexceptionalStreamWriter {
201    #[doc = "Direct (non-virtual) call to `UnexceptionalStreamWriter`'s own `Flush`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
202    pub unsafe fn flush(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
203        let __mi = Self::flush_method_info();
204        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
205        __inner(this.into(), ::core::option::Option::None)
206    }
207
208    #[doc = "Direct (non-virtual) call to `UnexceptionalStreamWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
209    pub unsafe fn write(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> () {
210        let __mi = Self::write_method_info();
211        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> () =
212            ::core::mem::transmute(__mi.method_ptr);
213        __inner(this.into(), buffer, index, count, ::core::option::Option::None)
214    }
215
216    #[doc = "Direct (non-virtual) call to `UnexceptionalStreamWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
217    pub unsafe fn write_2(this: impl ::core::convert::Into<::unity::IlInstance>, value: u16) -> () {
218        let __mi = Self::write_2_method_info();
219        let __inner: extern "C" fn(::unity::IlInstance, u16, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
220        __inner(this.into(), value, ::core::option::Option::None)
221    }
222
223    #[doc = "Direct (non-virtual) call to `UnexceptionalStreamWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
224    pub unsafe fn write_3(this: impl ::core::convert::Into<::unity::IlInstance>, value: ::unity::Array<u16>) -> () {
225        let __mi = Self::write_3_method_info();
226        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
227        __inner(this.into(), value, ::core::option::Option::None)
228    }
229
230    #[doc = "Direct (non-virtual) call to `UnexceptionalStreamWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
231    pub unsafe fn write_4(this: impl ::core::convert::Into<::unity::IlInstance>, value: ::unity::Il2CppString) -> () {
232        let __mi = Self::write_4_method_info();
233        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
234            ::core::mem::transmute(__mi.method_ptr);
235        __inner(this.into(), value, ::core::option::Option::None)
236    }
237}
238
239#[cfg(feature = "system-io-unexceptionalstreamwriter")]
240#[doc(hidden)]
241pub mod prelude {
242    pub use super::{IUnexceptionalStreamWriter, IUnexceptionalStreamWriterMethods, UnexceptionalStreamWriter};
243    #[cfg(feature = "system-io-streamwriter")]
244    pub use crate::system::io::streamwriter::IStreamWriterMethods;
245    #[cfg(feature = "system-io-textwriter")]
246    pub use crate::system::io::textwriter::ITextWriterMethods;
247    #[cfg(feature = "system-object")]
248    pub use crate::system::object::IObjectMethods;
249    pub use crate::system::{
250        io::{streamwriter::IStreamWriter, textwriter::ITextWriter},
251        object::IObject,
252    };
253}