engage/generated/system/io/
unexceptionalstreamreader.rs1#[cfg(feature = "system-io-unexceptionalstreamreader-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 io::{
10 streamreader::{IStreamReader, StreamReader},
11 textreader::{ITextReader, TextReader},
12 },
13 object::{IObject, Object},
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/unexceptionalstreamreader/UnexceptionalStreamReader.md"))]
17 #[::unity::class(namespace = "System.IO", name = "UnexceptionalStreamReader")]
18 #[parent(crate::system::io::streamreader::StreamReader)]
19 pub struct UnexceptionalStreamReader {
20 #[static_field]
21 #[rename(name = "newline")]
22 pub newline: ::unity::Array<bool>,
23 #[static_field]
24 #[rename(name = "newlineChar")]
25 pub newline_char: u16,
26 }
27}
28
29#[cfg(feature = "system-io-unexceptionalstreamreader-types")]
30pub use __types::*;
31
32#[cfg(feature = "system-io-unexceptionalstreamreader")]
33impl UnexceptionalStreamReader {
34 #[doc = "`.cctor()` overload"]
35 pub fn cctor() -> () {
36 unsafe {
37 ::unity::il2cpp_call!((::unity::module_base()+0x3572260usize)as*mut u8,();
38 )
39 }
40 }
41}
42
43#[cfg(feature = "system-io-unexceptionalstreamreader")]
44pub trait IUnexceptionalStreamReaderMethods: IUnexceptionalStreamReader {
45 #[doc = "`Peek()` overload"]
46 fn peek(self) -> i32 {
47 unsafe {
48 let __receiver =
49 <UnexceptionalStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
50 {
51 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
52 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
53 panic!(
54 "unity: virtual slot {}
55 out of range (vtable len {}
56) on the runtime class behind {}
57 (method `{}
58`)",
59 9usize,
60 __vt.len(),
61 <UnexceptionalStreamReader as ::unity::ClassIdentity>::NAME,
62 "Peek",
63 )
64 });
65 let __inner: extern "C" fn(UnexceptionalStreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
66 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
67 __inner(__receiver, __mi)
68 }
69 }
70 }
71 #[doc = "`Read()` overload"]
72 fn read(self) -> i32 {
73 unsafe {
74 let __receiver =
75 <UnexceptionalStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
76 {
77 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
78 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
79 panic!(
80 "unity: virtual slot {}
81 out of range (vtable len {}
82) on the runtime class behind {}
83 (method `{}
84`)",
85 10usize,
86 __vt.len(),
87 <UnexceptionalStreamReader as ::unity::ClassIdentity>::NAME,
88 "Read",
89 )
90 });
91 let __inner: extern "C" fn(UnexceptionalStreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
92 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
93 __inner(__receiver, __mi)
94 }
95 }
96 }
97 #[doc = "`Read(::unity::Array<u16>, i32, i32)` overload"]
98 fn read_2(
99 self,
100 dest_buffer: impl ::core::convert::Into<::unity::Array<u16>>,
101 index: impl ::core::convert::Into<i32>,
102 count: impl ::core::convert::Into<i32>,
103 ) -> i32 {
104 unsafe {
105 let __receiver =
106 <UnexceptionalStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
107 {
108 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
109 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
110 panic!(
111 "unity: virtual slot {}
112 out of range (vtable len {}
113) on the runtime class behind {}
114 (method `{}
115`)",
116 11usize,
117 __vt.len(),
118 <UnexceptionalStreamReader as ::unity::ClassIdentity>::NAME,
119 "Read",
120 )
121 });
122 let __inner: extern "C" fn(UnexceptionalStreamReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
123 ::core::mem::transmute(__vi.method_ptr);
124 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
125 __inner(
126 __receiver,
127 ::core::convert::Into::into(dest_buffer),
128 ::core::convert::Into::into(index),
129 ::core::convert::Into::into(count),
130 __mi,
131 )
132 }
133 }
134 }
135 #[doc = "`CheckEOL(u16)` overload"]
136 fn check_eol(self, current: impl ::core::convert::Into<u16>) -> bool {
137 unsafe {
138 let __receiver =
139 <UnexceptionalStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140 ::unity::il2cpp_call!((::unity::module_base()+0x35727c0usize)as*mut u8,bool;
141(UnexceptionalStreamReader)__receiver,(u16)::core::convert::Into::into(current))
142 }
143 }
144 #[doc = "`ReadLine()` overload"]
145 fn read_line(self) -> ::unity::Il2CppString {
146 unsafe {
147 let __receiver =
148 <UnexceptionalStreamReader 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(14usize).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 14usize,
159 __vt.len(),
160 <UnexceptionalStreamReader as ::unity::ClassIdentity>::NAME,
161 "ReadLine",
162 )
163 });
164 let __inner: extern "C" fn(UnexceptionalStreamReader, ::unity::OptionalMethod) -> ::unity::Il2CppString =
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, __mi)
168 }
169 }
170 }
171 #[doc = "`ReadToEnd()` overload"]
172 fn read_to_end(self) -> ::unity::Il2CppString {
173 unsafe {
174 let __receiver =
175 <UnexceptionalStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
176 {
177 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
178 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
179 panic!(
180 "unity: virtual slot {}
181 out of range (vtable len {}
182) on the runtime class behind {}
183 (method `{}
184`)",
185 12usize,
186 __vt.len(),
187 <UnexceptionalStreamReader as ::unity::ClassIdentity>::NAME,
188 "ReadToEnd",
189 )
190 });
191 let __inner: extern "C" fn(UnexceptionalStreamReader, ::unity::OptionalMethod) -> ::unity::Il2CppString =
192 ::core::mem::transmute(__vi.method_ptr);
193 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
194 __inner(__receiver, __mi)
195 }
196 }
197 }
198}
199
200#[cfg(feature = "system-io-unexceptionalstreamreader")]
201impl<__T: IUnexceptionalStreamReader> IUnexceptionalStreamReaderMethods for __T {}
202
203#[cfg(feature = "system-io-unexceptionalstreamreader")]
204impl UnexceptionalStreamReader {
205 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
206 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
207 }
208
209 pub fn peek_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
211 }
212
213 pub fn read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
214 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
215 }
216
217 pub fn read_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
218 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
219 }
220
221 pub fn check_eol_method_info() -> &'static ::unity::il2cpp::MethodInfo {
222 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
223 }
224
225 pub fn read_line_method_info() -> &'static ::unity::il2cpp::MethodInfo {
226 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
227 }
228
229 pub fn read_to_end_method_info() -> &'static ::unity::il2cpp::MethodInfo {
230 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
231 }
232}
233
234#[cfg(feature = "system-io-unexceptionalstreamreader")]
235impl UnexceptionalStreamReader {
236 #[doc = "Direct (non-virtual) call to `UnexceptionalStreamReader`'s own `Peek`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
237 pub unsafe fn peek(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
238 let __mi = Self::peek_method_info();
239 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
240 __inner(this.into(), ::core::option::Option::None)
241 }
242
243 #[doc = "Direct (non-virtual) call to `UnexceptionalStreamReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
244 pub unsafe fn read(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
245 let __mi = Self::read_method_info();
246 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
247 __inner(this.into(), ::core::option::Option::None)
248 }
249
250 #[doc = "Direct (non-virtual) call to `UnexceptionalStreamReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
251 pub unsafe fn read_2(this: impl ::core::convert::Into<::unity::IlInstance>, dest_buffer: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
252 let __mi = Self::read_2_method_info();
253 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
254 ::core::mem::transmute(__mi.method_ptr);
255 __inner(this.into(), dest_buffer, index, count, ::core::option::Option::None)
256 }
257
258 #[doc = "Direct (non-virtual) call to `UnexceptionalStreamReader`'s own `ReadLine`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
259 pub unsafe fn read_line(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
260 let __mi = Self::read_line_method_info();
261 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
262 __inner(this.into(), ::core::option::Option::None)
263 }
264
265 #[doc = "Direct (non-virtual) call to `UnexceptionalStreamReader`'s own `ReadToEnd`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
266 pub unsafe fn read_to_end(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
267 let __mi = Self::read_to_end_method_info();
268 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
269 __inner(this.into(), ::core::option::Option::None)
270 }
271}
272
273#[cfg(feature = "system-io-unexceptionalstreamreader")]
274#[doc(hidden)]
275pub mod prelude {
276 pub use super::{IUnexceptionalStreamReader, IUnexceptionalStreamReaderMethods, UnexceptionalStreamReader};
277 #[cfg(feature = "system-io-streamreader")]
278 pub use crate::system::io::streamreader::IStreamReaderMethods;
279 #[cfg(feature = "system-io-textreader")]
280 pub use crate::system::io::textreader::ITextReaderMethods;
281 #[cfg(feature = "system-object")]
282 pub use crate::system::object::IObjectMethods;
283 pub use crate::system::{
284 io::{streamreader::IStreamReader, textreader::ITextReader},
285 object::IObject,
286 };
287}