Skip to main content

engage/generated/unity_engine/
unitylogwriter.rs

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