engage/generated/moon_sharp/interpreter/io/
bindumpbinarywriter.rs1#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinarywriter-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 io::binarywriter::{BinaryWriter, IBinaryWriter},
10 object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/io/bindumpbinarywriter/BinDumpBinaryWriter.md"))]
14 #[::unity::class(namespace = "MoonSharp.Interpreter.IO", name = "BinDumpBinaryWriter")]
15 #[parent(crate::system::io::binarywriter::BinaryWriter)]
16 pub struct BinDumpBinaryWriter {
17 #[offset(72)]
18 #[rename(name = "m_StringMap")]
19 pub m_string_map: crate::system::collections::generic::dictionary_2::Dictionary_2<::unity::Il2CppString, i32>,
20 }
21}
22
23#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinarywriter-types")]
24pub use __types::*;
25
26#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinarywriter")]
27#[doc(hidden)]
28#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
29mod __BinDumpBinaryWriter_unity_raw {
30 use super::*;
31 #[doc(hidden)]
32 #[allow(non_snake_case)]
33 pub mod __lookup_ctor {
34 use super::*;
35 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
36 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<crate::system::io::stream::Stream as ::unity::IlType>::il_type()];
37 ::unity::lookup::method_info_on_class_with_signature(
38 <BinDumpBinaryWriter as ::unity::ClassIdentity>::class(),
39 ".ctor",
40 1,
41 param_types,
42 false,
43 )
44 });
45 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
46 match &*METHOD {
47 ::core::result::Result::Ok(mi) => *mi,
48 ::core::result::Result::Err(e) => {
49 panic!(
50 "method lookup failed: {}
51::{}
52: {}
53",
54 <BinDumpBinaryWriter as ::unity::ClassIdentity>::NAME,
55 ".ctor",
56 e
57 )
58 },
59 }
60 }
61 }
62}
63
64#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinarywriter")]
65pub trait IBinDumpBinaryWriterMethods: IBinDumpBinaryWriter {
66 #[doc = "`.ctor(crate::system::io::stream::Stream)` overload"]
67 fn ctor(self, s: impl ::core::convert::Into<crate::system::io::stream::Stream>) -> () {
68 unsafe {
69 let __receiver = <BinDumpBinaryWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
70 ::unity::il2cpp_call!(__BinDumpBinaryWriter_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
71(BinDumpBinaryWriter)__receiver,(crate::system::io::stream::Stream)::core::convert::Into::into(s))
72 }
73 }
74 #[doc = "`Write(u32)` overload"]
75 fn write(self, value: impl ::core::convert::Into<u32>) -> () {
76 unsafe {
77 let __receiver = <BinDumpBinaryWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
78 {
79 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
80 let __vi = *__vt.get(18usize).unwrap_or_else(|| {
81 panic!(
82 "unity: virtual slot {}
83 out of range (vtable len {}
84) on the runtime class behind {}
85 (method `{}
86`)",
87 18usize,
88 __vt.len(),
89 <BinDumpBinaryWriter as ::unity::ClassIdentity>::NAME,
90 "Write",
91 )
92 });
93 let __inner: extern "C" fn(BinDumpBinaryWriter, u32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
94 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
95 __inner(__receiver, ::core::convert::Into::into(value), __mi)
96 }
97 }
98 }
99 #[doc = "`Write(i32)` overload"]
100 fn write_2(self, value: impl ::core::convert::Into<i32>) -> () {
101 unsafe {
102 let __receiver = <BinDumpBinaryWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
103 {
104 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
105 let __vi = *__vt.get(17usize).unwrap_or_else(|| {
106 panic!(
107 "unity: virtual slot {}
108 out of range (vtable len {}
109) on the runtime class behind {}
110 (method `{}
111`)",
112 17usize,
113 __vt.len(),
114 <BinDumpBinaryWriter as ::unity::ClassIdentity>::NAME,
115 "Write",
116 )
117 });
118 let __inner: extern "C" fn(BinDumpBinaryWriter, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
119 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
120 __inner(__receiver, ::core::convert::Into::into(value), __mi)
121 }
122 }
123 }
124 #[doc = "`Write(::unity::Il2CppString)` overload"]
125 fn write_3(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
126 unsafe {
127 let __receiver = <BinDumpBinaryWriter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
128 {
129 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
130 let __vi = *__vt.get(22usize).unwrap_or_else(|| {
131 panic!(
132 "unity: virtual slot {}
133 out of range (vtable len {}
134) on the runtime class behind {}
135 (method `{}
136`)",
137 22usize,
138 __vt.len(),
139 <BinDumpBinaryWriter as ::unity::ClassIdentity>::NAME,
140 "Write",
141 )
142 });
143 let __inner: extern "C" fn(BinDumpBinaryWriter, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
144 ::core::mem::transmute(__vi.method_ptr);
145 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
146 __inner(__receiver, ::core::convert::Into::into(value), __mi)
147 }
148 }
149 }
150}
151
152#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinarywriter")]
153impl<__T: IBinDumpBinaryWriter> IBinDumpBinaryWriterMethods for __T {}
154
155#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinarywriter")]
156impl BinDumpBinaryWriter {
157 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
158 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
159 }
160
161 pub fn write_method_info() -> &'static ::unity::il2cpp::MethodInfo {
162 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
163 }
164
165 pub fn write_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
167 }
168
169 pub fn write_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
171 }
172}
173
174#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinarywriter")]
175impl BinDumpBinaryWriter {
176 #[doc = "Direct (non-virtual) call to `BinDumpBinaryWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
177 pub unsafe fn write(this: impl ::core::convert::Into<::unity::IlInstance>, value: u32) -> () {
178 let __mi = Self::write_method_info();
179 let __inner: extern "C" fn(::unity::IlInstance, u32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
180 __inner(this.into(), value, ::core::option::Option::None)
181 }
182
183 #[doc = "Direct (non-virtual) call to `BinDumpBinaryWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
184 pub unsafe fn write_2(this: impl ::core::convert::Into<::unity::IlInstance>, value: i32) -> () {
185 let __mi = Self::write_2_method_info();
186 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
187 __inner(this.into(), value, ::core::option::Option::None)
188 }
189
190 #[doc = "Direct (non-virtual) call to `BinDumpBinaryWriter`'s own `Write`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
191 pub unsafe fn write_3(this: impl ::core::convert::Into<::unity::IlInstance>, value: ::unity::Il2CppString) -> () {
192 let __mi = Self::write_3_method_info();
193 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
194 ::core::mem::transmute(__mi.method_ptr);
195 __inner(this.into(), value, ::core::option::Option::None)
196 }
197}
198
199#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinarywriter")]
200impl BinDumpBinaryWriter {
201 #[doc = "`.ctor(crate::system::io::stream::Stream)` — overload selector"]
202 pub fn new(s: crate::system::io::stream::Stream) -> Self {
203 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
204 panic!(
205 "{}
206::{}
207 failed to instantiate",
208 ::core::stringify!(BinDumpBinaryWriter),
209 ::core::stringify!(new),
210 )
211 });
212 <Self as IBinDumpBinaryWriterMethods>::ctor(this, s);
213 this
214 }
215}
216
217#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinarywriter")]
218#[doc(hidden)]
219pub mod prelude {
220 pub use super::{BinDumpBinaryWriter, IBinDumpBinaryWriter, IBinDumpBinaryWriterMethods};
221 #[cfg(feature = "system-io-binarywriter")]
222 pub use crate::system::io::binarywriter::IBinaryWriterMethods;
223 #[cfg(feature = "system-object")]
224 pub use crate::system::object::IObjectMethods;
225 pub use crate::system::{io::binarywriter::IBinaryWriter, object::IObject};
226}