Skip to main content

engage/generated/system/reflection/
exceptionhandlingclause.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-reflection-exceptionhandlingclause-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/reflection/exceptionhandlingclause/ExceptionHandlingClause.md"))]
11    #[::unity::class(namespace = "System.Reflection", name = "ExceptionHandlingClause")]
12    #[parent(crate::system::object::Object)]
13    pub struct ExceptionHandlingClause {
14        #[offset(16)]
15        #[rename(name = "catch_type")]
16        pub catch_type: ::unity::SystemType,
17        #[offset(24)]
18        #[rename(name = "filter_offset")]
19        pub filter_offset: i32,
20        #[offset(28)]
21        #[rename(name = "flags")]
22        pub flags: crate::system::reflection::exceptionhandlingclauseoptions::ExceptionHandlingClauseOptions,
23        #[offset(32)]
24        #[rename(name = "try_offset")]
25        pub try_offset: i32,
26        #[offset(36)]
27        #[rename(name = "try_length")]
28        pub try_length: i32,
29        #[offset(40)]
30        #[rename(name = "handler_offset")]
31        pub handler_offset: i32,
32        #[offset(44)]
33        #[rename(name = "handler_length")]
34        pub handler_length: i32,
35    }
36}
37
38#[cfg(feature = "system-reflection-exceptionhandlingclause-types")]
39pub use __types::*;
40
41#[cfg(feature = "system-reflection-exceptionhandlingclause")]
42pub trait IExceptionHandlingClauseMethods: IExceptionHandlingClause {
43    #[doc = "`.ctor()` overload"]
44    fn ctor(self) -> () {
45        unsafe {
46            let __receiver =
47                <ExceptionHandlingClause as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
48            ::unity::il2cpp_call!((::unity::module_base()+0x3ad62a0usize)as*mut u8,();
49(ExceptionHandlingClause)__receiver)
50        }
51    }
52    #[doc = "`ToString()` overload"]
53    fn to_string(self) -> ::unity::Il2CppString {
54        unsafe {
55            let __receiver =
56                <ExceptionHandlingClause 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(3usize).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                        3usize,
67                        __vt.len(),
68                        <ExceptionHandlingClause as ::unity::ClassIdentity>::NAME,
69                        "ToString",
70                    )
71                });
72                let __inner: extern "C" fn(ExceptionHandlingClause, ::unity::OptionalMethod) -> ::unity::Il2CppString =
73                    ::core::mem::transmute(__vi.method_ptr);
74                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
75                __inner(__receiver, __mi)
76            }
77        }
78    }
79}
80
81#[cfg(feature = "system-reflection-exceptionhandlingclause")]
82impl<__T: IExceptionHandlingClause> IExceptionHandlingClauseMethods for __T {}
83
84#[cfg(feature = "system-reflection-exceptionhandlingclause")]
85impl ExceptionHandlingClause {
86    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
87        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
88    }
89
90    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
91        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
92    }
93}
94
95#[cfg(feature = "system-reflection-exceptionhandlingclause")]
96impl ExceptionHandlingClause {
97    #[doc = "Direct (non-virtual) call to `ExceptionHandlingClause`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
98    pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
99        let __mi = Self::to_string_method_info();
100        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
101        __inner(this.into(), ::core::option::Option::None)
102    }
103}
104
105#[cfg(feature = "system-reflection-exceptionhandlingclause")]
106impl ExceptionHandlingClause {
107    #[doc = "`.ctor()` — no args"]
108    pub fn new() -> Self {
109        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
110            panic!(
111                "{}
112::{}
113 failed to instantiate",
114                ::core::stringify!(ExceptionHandlingClause),
115                ::core::stringify!(new),
116            )
117        });
118        <Self as IExceptionHandlingClauseMethods>::ctor(this);
119        this
120    }
121}
122
123#[cfg(feature = "system-reflection-exceptionhandlingclause")]
124#[doc(hidden)]
125pub mod prelude {
126    pub use super::{ExceptionHandlingClause, IExceptionHandlingClause, IExceptionHandlingClauseMethods};
127    pub use crate::system::object::IObject;
128    #[cfg(feature = "system-object")]
129    pub use crate::system::object::IObjectMethods;
130}