Skip to main content

engage/generated/system/collections/
icomparer_interface.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-collections-icomparer_interface-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/icomparer_interface/IComparer_Interface.md"))]
10    #[::unity::class(namespace = "System.Collections", name = "IComparer")]
11    pub struct IComparer_Interface {}
12}
13
14#[cfg(feature = "system-collections-icomparer_interface-types")]
15pub use __types::*;
16
17#[cfg(feature = "system-collections-icomparer_interface")]
18pub trait IIComparer_InterfaceMethods: IIComparer_Interface {
19    #[doc = "`Compare(crate::system::object::Object, crate::system::object::Object)` overload"]
20    fn compare(
21        self,
22        x: impl ::core::convert::Into<crate::system::object::Object>,
23        y: impl ::core::convert::Into<crate::system::object::Object>,
24    ) -> i32 {
25        unsafe {
26            let __receiver = <IComparer_Interface 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                        <IComparer_Interface as ::unity::ClassIdentity>::NAME,
39                        "Compare",
40                    )
41                });
42                let __inner: extern "C" fn(
43                    IComparer_Interface,
44                    crate::system::object::Object,
45                    crate::system::object::Object,
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(__receiver, ::core::convert::Into::into(x), ::core::convert::Into::into(y), __mi)
50            }
51        }
52    }
53}
54
55#[cfg(feature = "system-collections-icomparer_interface")]
56impl<__T: IIComparer_Interface> IIComparer_InterfaceMethods for __T {}
57
58#[cfg(feature = "system-collections-icomparer_interface")]
59impl IComparer_Interface {
60    pub fn compare_method_info() -> &'static ::unity::il2cpp::MethodInfo {
61        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
62    }
63}
64
65#[cfg(feature = "system-collections-icomparer_interface")]
66impl IComparer_Interface {
67    #[doc = "Direct (non-virtual) call to `IComparer_Interface`'s own `Compare`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
68    pub unsafe fn compare(
69        this: impl ::core::convert::Into<::unity::IlInstance>,
70        x: crate::system::object::Object,
71        y: crate::system::object::Object,
72    ) -> i32 {
73        let __mi = Self::compare_method_info();
74        let __inner: extern "C" fn(
75            ::unity::IlInstance,
76            crate::system::object::Object,
77            crate::system::object::Object,
78            ::unity::OptionalMethod,
79        ) -> i32 = ::core::mem::transmute(__mi.method_ptr);
80        __inner(this.into(), x, y, ::core::option::Option::None)
81    }
82}
83
84#[cfg(feature = "system-collections-icomparer_interface")]
85#[doc(hidden)]
86pub mod prelude {
87    pub use super::{IComparer_Interface, IIComparer_Interface, IIComparer_InterfaceMethods};
88}