engage/generated/unity_engine/networking/
certificatehandler.rs1#[cfg(feature = "unity_engine-networking-certificatehandler-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/networking/certificatehandler/CertificateHandler.md"))]
11 #[::unity::class(namespace = "UnityEngine.Networking", name = "CertificateHandler")]
12 #[parent(crate::system::object::Object)]
13 pub struct CertificateHandler {
14 #[offset(16)]
15 #[rename(name = "m_Ptr")]
16 pub m_ptr: ::unity::IntPtr,
17 }
18}
19
20#[cfg(feature = "unity_engine-networking-certificatehandler-types")]
21pub use __types::*;
22
23#[cfg(feature = "unity_engine-networking-certificatehandler")]
24pub trait ICertificateHandlerMethods: ICertificateHandler {
25 #[doc = "`Release()` overload"]
26 fn release(self) -> () {
27 unsafe {
28 let __receiver = <CertificateHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
29 ::unity::il2cpp_call!((::unity::module_base()+0x3f18230usize)as*mut u8,();
30(CertificateHandler)__receiver)
31 }
32 }
33 #[doc = "`ValidateCertificate(::unity::Array<u8>)` overload"]
34 fn validate_certificate(self, certificate_data: impl ::core::convert::Into<::unity::Array<u8>>) -> bool {
35 unsafe {
36 let __receiver = <CertificateHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
37 {
38 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
39 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
40 panic!(
41 "unity: virtual slot {}
42 out of range (vtable len {}
43) on the runtime class behind {}
44 (method `{}
45`)",
46 4usize,
47 __vt.len(),
48 <CertificateHandler as ::unity::ClassIdentity>::NAME,
49 "ValidateCertificate",
50 )
51 });
52 let __inner: extern "C" fn(CertificateHandler, ::unity::Array<u8>, ::unity::OptionalMethod) -> bool =
53 ::core::mem::transmute(__vi.method_ptr);
54 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
55 __inner(__receiver, ::core::convert::Into::into(certificate_data), __mi)
56 }
57 }
58 }
59 #[doc = "`ValidateCertificateNative(::unity::Array<u8>)` overload"]
60 fn validate_certificate_native(self, certificate_data: impl ::core::convert::Into<::unity::Array<u8>>) -> bool {
61 unsafe {
62 let __receiver = <CertificateHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
63 ::unity::il2cpp_call!((::unity::module_base()+0x3f18290usize)as*mut u8,bool;
64(CertificateHandler)__receiver,(::unity::Array<u8>)::core::convert::Into::into(certificate_data))
65 }
66 }
67 #[doc = "`Dispose()` overload"]
68 fn dispose(self) -> () {
69 unsafe {
70 let __receiver = <CertificateHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
71 {
72 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
73 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
74 panic!(
75 "unity: virtual slot {}
76 out of range (vtable len {}
77) on the runtime class behind {}
78 (method `{}
79`)",
80 5usize,
81 __vt.len(),
82 <CertificateHandler as ::unity::ClassIdentity>::NAME,
83 "Dispose",
84 )
85 });
86 let __inner: extern "C" fn(CertificateHandler, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
87 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
88 __inner(__receiver, __mi)
89 }
90 }
91 }
92}
93
94#[cfg(feature = "unity_engine-networking-certificatehandler")]
95impl<__T: ICertificateHandler> ICertificateHandlerMethods for __T {}
96
97#[cfg(feature = "unity_engine-networking-certificatehandler")]
98impl CertificateHandler {
99 pub fn release_method_info() -> &'static ::unity::il2cpp::MethodInfo {
100 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
101 }
102
103 pub fn validate_certificate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
104 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
105 }
106
107 pub fn validate_certificate_native_method_info() -> &'static ::unity::il2cpp::MethodInfo {
108 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
109 }
110
111 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
112 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
113 }
114}
115
116#[cfg(feature = "unity_engine-networking-certificatehandler")]
117impl CertificateHandler {
118 #[doc = "Direct (non-virtual) call to `CertificateHandler`'s own `ValidateCertificate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
119 pub unsafe fn validate_certificate(this: impl ::core::convert::Into<::unity::IlInstance>, certificate_data: ::unity::Array<u8>) -> bool {
120 let __mi = Self::validate_certificate_method_info();
121 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u8>, ::unity::OptionalMethod) -> bool =
122 ::core::mem::transmute(__mi.method_ptr);
123 __inner(this.into(), certificate_data, ::core::option::Option::None)
124 }
125
126 #[doc = "Direct (non-virtual) call to `CertificateHandler`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
127 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
128 let __mi = Self::dispose_method_info();
129 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
130 __inner(this.into(), ::core::option::Option::None)
131 }
132}
133
134#[cfg(feature = "unity_engine-networking-certificatehandler")]
135#[doc(hidden)]
136pub mod prelude {
137 pub use super::{CertificateHandler, ICertificateHandler, ICertificateHandlerMethods};
138 pub use crate::system::object::IObject;
139 #[cfg(feature = "system-object")]
140 pub use crate::system::object::IObjectMethods;
141}