Skip to main content

engage/generated/system/io/
pinnedbuffermemorystream.rs

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