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