Skip to main content

engage/generated/unity_engine/bindings/
nativethrowsattribute.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-bindings-nativethrowsattribute-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8
9    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/bindings/nativethrowsattribute/NativeThrowsAttribute.md"))]
10    #[::unity::class(namespace = "UnityEngine.Bindings", name = "NativeThrowsAttribute")]
11    pub struct NativeThrowsAttribute {}
12}
13
14#[cfg(feature = "unity_engine-bindings-nativethrowsattribute-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-bindings-nativethrowsattribute")]
18pub trait INativeThrowsAttributeMethods: INativeThrowsAttribute {
19    #[doc = "`set_ThrowsException(bool)` overload"]
20    fn set_throws_exception(self, value: impl ::core::convert::Into<bool>) -> () {
21        unsafe {
22            let __receiver = <NativeThrowsAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
23            {
24                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
25                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
26                    panic!(
27                        "unity: virtual slot {}
28 out of range (vtable len {}
29) on the runtime class behind {}
30 (method `{}
31`)",
32                        4usize,
33                        __vt.len(),
34                        <NativeThrowsAttribute as ::unity::ClassIdentity>::NAME,
35                        "set_ThrowsException",
36                    )
37                });
38                let __inner: extern "C" fn(NativeThrowsAttribute, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
39                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
40                __inner(__receiver, ::core::convert::Into::into(value), __mi)
41            }
42        }
43    }
44    #[doc = "`.ctor()` overload"]
45    fn ctor(self) -> () {
46        unsafe {
47            let __receiver = <NativeThrowsAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
48            ::unity::il2cpp_call!((::unity::module_base()+0x3f38240usize)as*mut u8,();
49(NativeThrowsAttribute)__receiver)
50        }
51    }
52}
53
54#[cfg(feature = "unity_engine-bindings-nativethrowsattribute")]
55impl<__T: INativeThrowsAttribute> INativeThrowsAttributeMethods for __T {}
56
57#[cfg(feature = "unity_engine-bindings-nativethrowsattribute")]
58impl NativeThrowsAttribute {
59    pub fn set_throws_exception_method_info() -> &'static ::unity::il2cpp::MethodInfo {
60        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
61    }
62
63    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
64        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
65    }
66}
67
68#[cfg(feature = "unity_engine-bindings-nativethrowsattribute")]
69impl NativeThrowsAttribute {
70    #[doc = "Direct (non-virtual) call to `NativeThrowsAttribute`'s own `set_ThrowsException`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
71    pub unsafe fn set_throws_exception(this: impl ::core::convert::Into<::unity::IlInstance>, value: bool) -> () {
72        let __mi = Self::set_throws_exception_method_info();
73        let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
74        __inner(this.into(), value, ::core::option::Option::None)
75    }
76}
77
78#[cfg(feature = "unity_engine-bindings-nativethrowsattribute")]
79impl NativeThrowsAttribute {
80    #[doc = "`.ctor()` — no args"]
81    pub fn new() -> Self {
82        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
83            panic!(
84                "{}
85::{}
86 failed to instantiate",
87                ::core::stringify!(NativeThrowsAttribute),
88                ::core::stringify!(new),
89            )
90        });
91        <Self as INativeThrowsAttributeMethods>::ctor(this);
92        this
93    }
94}
95
96#[cfg(feature = "unity_engine-bindings-nativethrowsattribute")]
97#[doc(hidden)]
98pub mod prelude {
99    pub use super::{INativeThrowsAttribute, INativeThrowsAttributeMethods, NativeThrowsAttribute};
100}