Skip to main content

engage/generated/unity_engine/
customyieldinstruction.rs

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