engage/generated/system/collections/
istructuralcomparable.rs1#[cfg(feature = "system-collections-istructuralcomparable-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/system/collections/istructuralcomparable/IStructuralComparable.md"))]
10 #[::unity::class(namespace = "System.Collections", name = "IStructuralComparable")]
11 pub struct IStructuralComparable {}
12}
13
14#[cfg(feature = "system-collections-istructuralcomparable-types")]
15pub use __types::*;
16
17#[cfg(feature = "system-collections-istructuralcomparable")]
18pub trait IIStructuralComparableMethods: IIStructuralComparable {
19 #[doc = "`CompareTo(crate::system::object::Object, crate::system::collections::icomparer_interface::IComparer_Interface)` overload"]
20 fn compare_to(
21 self,
22 other: impl ::core::convert::Into<crate::system::object::Object>,
23 comparer: impl ::core::convert::Into<crate::system::collections::icomparer_interface::IComparer_Interface>,
24 ) -> i32 {
25 unsafe {
26 let __receiver = <IStructuralComparable as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
27 {
28 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
29 let __vi = *__vt.get(0usize).unwrap_or_else(|| {
30 panic!(
31 "unity: virtual slot {}
32 out of range (vtable len {}
33) on the runtime class behind {}
34 (method `{}
35`)",
36 0usize,
37 __vt.len(),
38 <IStructuralComparable as ::unity::ClassIdentity>::NAME,
39 "CompareTo",
40 )
41 });
42 let __inner: extern "C" fn(
43 IStructuralComparable,
44 crate::system::object::Object,
45 crate::system::collections::icomparer_interface::IComparer_Interface,
46 ::unity::OptionalMethod,
47 ) -> i32 = ::core::mem::transmute(__vi.method_ptr);
48 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
49 __inner(
50 __receiver,
51 ::core::convert::Into::into(other),
52 ::core::convert::Into::into(comparer),
53 __mi,
54 )
55 }
56 }
57 }
58}
59
60#[cfg(feature = "system-collections-istructuralcomparable")]
61impl<__T: IIStructuralComparable> IIStructuralComparableMethods for __T {}
62
63#[cfg(feature = "system-collections-istructuralcomparable")]
64impl IStructuralComparable {
65 pub fn compare_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
66 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
67 }
68}
69
70#[cfg(feature = "system-collections-istructuralcomparable")]
71impl IStructuralComparable {
72 #[doc = "Direct (non-virtual) call to `IStructuralComparable`'s own `CompareTo`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
73 pub unsafe fn compare_to(
74 this: impl ::core::convert::Into<::unity::IlInstance>,
75 other: crate::system::object::Object,
76 comparer: crate::system::collections::icomparer_interface::IComparer_Interface,
77 ) -> i32 {
78 let __mi = Self::compare_to_method_info();
79 let __inner: extern "C" fn(
80 ::unity::IlInstance,
81 crate::system::object::Object,
82 crate::system::collections::icomparer_interface::IComparer_Interface,
83 ::unity::OptionalMethod,
84 ) -> i32 = ::core::mem::transmute(__mi.method_ptr);
85 __inner(this.into(), other, comparer, ::core::option::Option::None)
86 }
87}
88
89#[cfg(feature = "system-collections-istructuralcomparable")]
90#[doc(hidden)]
91pub mod prelude {
92 pub use super::{IIStructuralComparable, IIStructuralComparableMethods, IStructuralComparable};
93}