Skip to main content

engage/generated/moon_sharp/interpreter/tree/statements/
breakstatement.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-tree-statements-breakstatement-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        moon_sharp::interpreter::tree::{
10            nodebase::{INodeBase, NodeBase},
11            statement::{IStatement, Statement},
12        },
13        system::object::{IObject, Object},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/tree/statements/breakstatement/BreakStatement.md"))]
17    #[::unity::class(namespace = "MoonSharp.Interpreter.Tree.Statements", name = "BreakStatement")]
18    #[parent(crate::moon_sharp::interpreter::tree::statement::Statement)]
19    pub struct BreakStatement {
20        #[offset(32)]
21        #[rename(name = "m_Ref")]
22        pub m_ref: crate::moon_sharp::interpreter::debugging::sourceref::SourceRef,
23    }
24}
25
26#[cfg(feature = "moon_sharp-interpreter-tree-statements-breakstatement-types")]
27pub use __types::*;
28
29#[cfg(feature = "moon_sharp-interpreter-tree-statements-breakstatement")]
30#[doc(hidden)]
31#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
32mod __BreakStatement_unity_raw {
33    use super::*;
34    #[doc(hidden)]
35    #[allow(non_snake_case)]
36    pub mod __lookup_ctor {
37        use super::*;
38        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
39            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
40                &[<crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext as ::unity::IlType>::il_type()];
41            ::unity::lookup::method_info_on_class_with_signature(<BreakStatement as ::unity::ClassIdentity>::class(), ".ctor", 1, param_types, false)
42        });
43        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
44            match &*METHOD {
45                ::core::result::Result::Ok(mi) => *mi,
46                ::core::result::Result::Err(e) => {
47                    panic!(
48                        "method lookup failed: {}
49::{}
50: {}
51",
52                        <BreakStatement as ::unity::ClassIdentity>::NAME,
53                        ".ctor",
54                        e
55                    )
56                },
57            }
58        }
59    }
60}
61
62#[cfg(feature = "moon_sharp-interpreter-tree-statements-breakstatement")]
63pub trait IBreakStatementMethods: IBreakStatement {
64    #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)` overload"]
65    fn ctor(self, lcontext: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext>) -> () {
66        unsafe {
67            let __receiver = <BreakStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
68            ::unity::il2cpp_call!(__BreakStatement_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
69(BreakStatement)__receiver,(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)::core::convert::Into::into(lcontext))
70        }
71    }
72    #[doc = "`Compile(crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode)` overload"]
73    fn compile(self, bc: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode>) -> () {
74        unsafe {
75            let __receiver = <BreakStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
76            {
77                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
78                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
79                    panic!(
80                        "unity: virtual slot {}
81 out of range (vtable len {}
82) on the runtime class behind {}
83 (method `{}
84`)",
85                        4usize,
86                        __vt.len(),
87                        <BreakStatement as ::unity::ClassIdentity>::NAME,
88                        "Compile",
89                    )
90                });
91                let __inner: extern "C" fn(
92                    BreakStatement,
93                    crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
94                    ::unity::OptionalMethod,
95                ) -> () = ::core::mem::transmute(__vi.method_ptr);
96                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
97                __inner(__receiver, ::core::convert::Into::into(bc), __mi)
98            }
99        }
100    }
101}
102
103#[cfg(feature = "moon_sharp-interpreter-tree-statements-breakstatement")]
104impl<__T: IBreakStatement> IBreakStatementMethods for __T {}
105
106#[cfg(feature = "moon_sharp-interpreter-tree-statements-breakstatement")]
107impl BreakStatement {
108    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
109        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
110    }
111
112    pub fn compile_method_info() -> &'static ::unity::il2cpp::MethodInfo {
113        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
114    }
115}
116
117#[cfg(feature = "moon_sharp-interpreter-tree-statements-breakstatement")]
118impl BreakStatement {
119    #[doc = "Direct (non-virtual) call to `BreakStatement`'s own `Compile`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
120    pub unsafe fn compile(
121        this: impl ::core::convert::Into<::unity::IlInstance>,
122        bc: crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
123    ) -> () {
124        let __mi = Self::compile_method_info();
125        let __inner: extern "C" fn(
126            ::unity::IlInstance,
127            crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
128            ::unity::OptionalMethod,
129        ) -> () = ::core::mem::transmute(__mi.method_ptr);
130        __inner(this.into(), bc, ::core::option::Option::None)
131    }
132}
133
134#[cfg(feature = "moon_sharp-interpreter-tree-statements-breakstatement")]
135impl BreakStatement {
136    #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)` — overload selector"]
137    pub fn new(lcontext: crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext) -> Self {
138        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
139            panic!(
140                "{}
141::{}
142 failed to instantiate",
143                ::core::stringify!(BreakStatement),
144                ::core::stringify!(new),
145            )
146        });
147        <Self as IBreakStatementMethods>::ctor(this, lcontext);
148        this
149    }
150}
151
152#[cfg(feature = "moon_sharp-interpreter-tree-statements-breakstatement")]
153#[doc(hidden)]
154pub mod prelude {
155    pub use super::{BreakStatement, IBreakStatement, IBreakStatementMethods};
156    #[cfg(feature = "moon_sharp-interpreter-tree-nodebase")]
157    pub use crate::moon_sharp::interpreter::tree::nodebase::INodeBaseMethods;
158    #[cfg(feature = "moon_sharp-interpreter-tree-statement")]
159    pub use crate::moon_sharp::interpreter::tree::statement::IStatementMethods;
160    #[cfg(feature = "system-object")]
161    pub use crate::system::object::IObjectMethods;
162    pub use crate::{
163        moon_sharp::interpreter::tree::{nodebase::INodeBase, statement::IStatement},
164        system::object::IObject,
165    };
166}