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