Skip to main content

engage/generated/system/io/
filestreamasyncresult.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-io-filestreamasyncresult-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/filestreamasyncresult/FileStreamAsyncResult.md"))]
11    #[::unity::class(namespace = "System.IO", name = "FileStreamAsyncResult")]
12    #[parent(crate::system::object::Object)]
13    pub struct FileStreamAsyncResult {
14        #[offset(16)]
15        #[rename(name = "state")]
16        pub state: ::unity::IlInstance,
17        #[offset(24)]
18        #[rename(name = "completed")]
19        pub completed: bool,
20        #[offset(48)]
21        #[rename(name = "completedSynch")]
22        pub completed_synch: bool,
23        #[offset(52)]
24        #[rename(name = "Count")]
25        pub count: i32,
26        #[offset(56)]
27        #[rename(name = "OriginalCount")]
28        pub original_count: i32,
29        #[offset(60)]
30        #[rename(name = "BytesRead")]
31        pub bytes_read: i32,
32    }
33}
34
35#[cfg(feature = "system-io-filestreamasyncresult-types")]
36pub use __types::*;
37
38#[cfg(feature = "system-io-filestreamasyncresult")]
39pub trait IFileStreamAsyncResultMethods: IFileStreamAsyncResult {
40    #[doc = "`get_AsyncState()` overload"]
41    fn get_async_state(self) -> crate::system::object::Object {
42        unsafe {
43            let __receiver = <FileStreamAsyncResult as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
44            {
45                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
46                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
47                    panic!(
48                        "unity: virtual slot {}
49 out of range (vtable len {}
50) on the runtime class behind {}
51 (method `{}
52`)",
53                        6usize,
54                        __vt.len(),
55                        <FileStreamAsyncResult as ::unity::ClassIdentity>::NAME,
56                        "get_AsyncState",
57                    )
58                });
59                let __inner: extern "C" fn(FileStreamAsyncResult, ::unity::OptionalMethod) -> crate::system::object::Object =
60                    ::core::mem::transmute(__vi.method_ptr);
61                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
62                __inner(__receiver, __mi)
63            }
64        }
65    }
66    #[doc = "`get_CompletedSynchronously()` overload"]
67    fn get_completed_synchronously(self) -> bool {
68        unsafe {
69            let __receiver = <FileStreamAsyncResult as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
70            {
71                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
72                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
73                    panic!(
74                        "unity: virtual slot {}
75 out of range (vtable len {}
76) on the runtime class behind {}
77 (method `{}
78`)",
79                        7usize,
80                        __vt.len(),
81                        <FileStreamAsyncResult as ::unity::ClassIdentity>::NAME,
82                        "get_CompletedSynchronously",
83                    )
84                });
85                let __inner: extern "C" fn(FileStreamAsyncResult, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
86                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
87                __inner(__receiver, __mi)
88            }
89        }
90    }
91    #[doc = "`get_IsCompleted()` overload"]
92    fn get_is_completed(self) -> bool {
93        unsafe {
94            let __receiver = <FileStreamAsyncResult as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
95            {
96                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
97                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
98                    panic!(
99                        "unity: virtual slot {}
100 out of range (vtable len {}
101) on the runtime class behind {}
102 (method `{}
103`)",
104                        4usize,
105                        __vt.len(),
106                        <FileStreamAsyncResult as ::unity::ClassIdentity>::NAME,
107                        "get_IsCompleted",
108                    )
109                });
110                let __inner: extern "C" fn(FileStreamAsyncResult, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
111                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
112                __inner(__receiver, __mi)
113            }
114        }
115    }
116}
117
118#[cfg(feature = "system-io-filestreamasyncresult")]
119impl<__T: IFileStreamAsyncResult> IFileStreamAsyncResultMethods for __T {}
120
121#[cfg(feature = "system-io-filestreamasyncresult")]
122impl FileStreamAsyncResult {
123    pub fn get_async_state_method_info() -> &'static ::unity::il2cpp::MethodInfo {
124        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
125    }
126
127    pub fn get_completed_synchronously_method_info() -> &'static ::unity::il2cpp::MethodInfo {
128        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
129    }
130
131    pub fn get_is_completed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
132        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
133    }
134}
135
136#[cfg(feature = "system-io-filestreamasyncresult")]
137impl FileStreamAsyncResult {
138    #[doc = "Direct (non-virtual) call to `FileStreamAsyncResult`'s own `get_AsyncState`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
139    pub unsafe fn get_async_state(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::object::Object {
140        let __mi = Self::get_async_state_method_info();
141        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::object::Object =
142            ::core::mem::transmute(__mi.method_ptr);
143        __inner(this.into(), ::core::option::Option::None)
144    }
145
146    #[doc = "Direct (non-virtual) call to `FileStreamAsyncResult`'s own `get_CompletedSynchronously`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
147    pub unsafe fn get_completed_synchronously(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
148        let __mi = Self::get_completed_synchronously_method_info();
149        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
150        __inner(this.into(), ::core::option::Option::None)
151    }
152
153    #[doc = "Direct (non-virtual) call to `FileStreamAsyncResult`'s own `get_IsCompleted`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
154    pub unsafe fn get_is_completed(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
155        let __mi = Self::get_is_completed_method_info();
156        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
157        __inner(this.into(), ::core::option::Option::None)
158    }
159}
160
161#[cfg(feature = "system-io-filestreamasyncresult")]
162#[doc(hidden)]
163pub mod prelude {
164    pub use super::{FileStreamAsyncResult, IFileStreamAsyncResult, IFileStreamAsyncResultMethods};
165    pub use crate::system::object::IObject;
166    #[cfg(feature = "system-object")]
167    pub use crate::system::object::IObjectMethods;
168}