engage/generated/moon_sharp/interpreter/tree/
loopboundary.rs1#[cfg(feature = "moon_sharp-interpreter-tree-loopboundary-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/moon_sharp/interpreter/tree/loopboundary/LoopBoundary.md"))]
11 #[::unity::class(namespace = "MoonSharp.Interpreter.Tree", name = "LoopBoundary")]
12 #[parent(crate::system::object::Object)]
13 pub struct LoopBoundary {}
14}
15
16#[cfg(feature = "moon_sharp-interpreter-tree-loopboundary-types")]
17pub use __types::*;
18
19#[cfg(feature = "moon_sharp-interpreter-tree-loopboundary")]
20#[doc(hidden)]
21#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
22mod __LoopBoundary_unity_raw {
23 use super::*;
24 #[doc(hidden)]
25 #[allow(non_snake_case)]
26 pub mod __lookup_ctor {
27 use super::*;
28 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
29 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
30 ::unity::lookup::method_info_on_class_with_signature(<LoopBoundary as ::unity::ClassIdentity>::class(), ".ctor", 0, param_types, false)
31 });
32 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
33 match &*METHOD {
34 ::core::result::Result::Ok(mi) => *mi,
35 ::core::result::Result::Err(e) => {
36 panic!(
37 "method lookup failed: {}
38::{}
39: {}
40",
41 <LoopBoundary as ::unity::ClassIdentity>::NAME,
42 ".ctor",
43 e
44 )
45 },
46 }
47 }
48 }
49}
50
51#[cfg(feature = "moon_sharp-interpreter-tree-loopboundary")]
52pub trait ILoopBoundaryMethods: ILoopBoundary {
53 #[doc = "`CompileBreak(crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode)` overload"]
54 fn compile_break(self, bc: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode>) -> () {
55 unsafe {
56 let __receiver = <LoopBoundary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
57 {
58 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
59 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
60 panic!(
61 "unity: virtual slot {}
62 out of range (vtable len {}
63) on the runtime class behind {}
64 (method `{}
65`)",
66 4usize,
67 __vt.len(),
68 <LoopBoundary as ::unity::ClassIdentity>::NAME,
69 "CompileBreak",
70 )
71 });
72 let __inner: extern "C" fn(
73 LoopBoundary,
74 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
75 ::unity::OptionalMethod,
76 ) -> () = ::core::mem::transmute(__vi.method_ptr);
77 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
78 __inner(__receiver, ::core::convert::Into::into(bc), __mi)
79 }
80 }
81 }
82 #[doc = "`IsBoundary()` overload"]
83 fn is_boundary(self) -> bool {
84 unsafe {
85 let __receiver = <LoopBoundary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
86 {
87 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
88 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
89 panic!(
90 "unity: virtual slot {}
91 out of range (vtable len {}
92) on the runtime class behind {}
93 (method `{}
94`)",
95 5usize,
96 __vt.len(),
97 <LoopBoundary as ::unity::ClassIdentity>::NAME,
98 "IsBoundary",
99 )
100 });
101 let __inner: extern "C" fn(LoopBoundary, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
102 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
103 __inner(__receiver, __mi)
104 }
105 }
106 }
107 #[doc = "`.ctor()` overload"]
108 fn ctor(self) -> () {
109 unsafe {
110 let __receiver = <LoopBoundary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
111 ::unity::il2cpp_call!(__LoopBoundary_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
112(LoopBoundary)__receiver)
113 }
114 }
115}
116
117#[cfg(feature = "moon_sharp-interpreter-tree-loopboundary")]
118impl<__T: ILoopBoundary> ILoopBoundaryMethods for __T {}
119
120#[cfg(feature = "moon_sharp-interpreter-tree-loopboundary")]
121impl LoopBoundary {
122 pub fn compile_break_method_info() -> &'static ::unity::il2cpp::MethodInfo {
123 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
124 }
125
126 pub fn is_boundary_method_info() -> &'static ::unity::il2cpp::MethodInfo {
127 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
128 }
129
130 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
131 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
132 }
133}
134
135#[cfg(feature = "moon_sharp-interpreter-tree-loopboundary")]
136impl LoopBoundary {
137 #[doc = "Direct (non-virtual) call to `LoopBoundary`'s own `CompileBreak`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
138 pub unsafe fn compile_break(
139 this: impl ::core::convert::Into<::unity::IlInstance>,
140 bc: crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
141 ) -> () {
142 let __mi = Self::compile_break_method_info();
143 let __inner: extern "C" fn(
144 ::unity::IlInstance,
145 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
146 ::unity::OptionalMethod,
147 ) -> () = ::core::mem::transmute(__mi.method_ptr);
148 __inner(this.into(), bc, ::core::option::Option::None)
149 }
150
151 #[doc = "Direct (non-virtual) call to `LoopBoundary`'s own `IsBoundary`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
152 pub unsafe fn is_boundary(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
153 let __mi = Self::is_boundary_method_info();
154 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
155 __inner(this.into(), ::core::option::Option::None)
156 }
157}
158
159#[cfg(feature = "moon_sharp-interpreter-tree-loopboundary")]
160impl LoopBoundary {
161 #[doc = "`.ctor()` — no args"]
162 pub fn new() -> Self {
163 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
164 panic!(
165 "{}
166::{}
167 failed to instantiate",
168 ::core::stringify!(LoopBoundary),
169 ::core::stringify!(new),
170 )
171 });
172 <Self as ILoopBoundaryMethods>::ctor(this);
173 this
174 }
175}
176
177#[cfg(feature = "moon_sharp-interpreter-tree-loopboundary")]
178#[doc(hidden)]
179pub mod prelude {
180 pub use super::{ILoopBoundary, ILoopBoundaryMethods, LoopBoundary};
181 pub use crate::system::object::IObject;
182 #[cfg(feature = "system-object")]
183 pub use crate::system::object::IObjectMethods;
184}