Skip to main content

engage/generated/system/collections/generic/
internalstringcomparer.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-collections-generic-internalstringcomparer-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        collections::generic::equalitycomparer_1::{EqualityComparer_1, IEqualityComparer_1},
10        object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/generic/internalstringcomparer/InternalStringComparer.md"))]
14    #[::unity::class(namespace = "System.Collections.Generic", name = "InternalStringComparer")]
15    #[parent(crate::system::collections::generic::equalitycomparer_1::EqualityComparer_1< ::unity::Il2CppString>)]
16    pub struct InternalStringComparer {}
17}
18
19#[cfg(feature = "system-collections-generic-internalstringcomparer-types")]
20pub use __types::*;
21
22#[cfg(feature = "system-collections-generic-internalstringcomparer")]
23pub trait IInternalStringComparerMethods: IInternalStringComparer {
24    #[doc = "`GetHashCode(::unity::Il2CppString)` overload"]
25    fn get_hash_code(self, obj: impl ::core::convert::Into<::unity::Il2CppString>) -> i32 {
26        unsafe {
27            let __receiver =
28                <InternalStringComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
29            {
30                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
31                let __vi = *__vt.get(9usize).unwrap_or_else(|| {
32                    panic!(
33                        "unity: virtual slot {}
34 out of range (vtable len {}
35) on the runtime class behind {}
36 (method `{}
37`)",
38                        9usize,
39                        __vt.len(),
40                        <InternalStringComparer as ::unity::ClassIdentity>::NAME,
41                        "GetHashCode",
42                    )
43                });
44                let __inner: extern "C" fn(InternalStringComparer, ::unity::Il2CppString, ::unity::OptionalMethod) -> i32 =
45                    ::core::mem::transmute(__vi.method_ptr);
46                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
47                __inner(__receiver, ::core::convert::Into::into(obj), __mi)
48            }
49        }
50    }
51    #[doc = "`Equals(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
52    fn equals(self, x: impl ::core::convert::Into<::unity::Il2CppString>, y: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
53        unsafe {
54            let __receiver =
55                <InternalStringComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56            {
57                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
58                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
59                    panic!(
60                        "unity: virtual slot {}
61 out of range (vtable len {}
62) on the runtime class behind {}
63 (method `{}
64`)",
65                        8usize,
66                        __vt.len(),
67                        <InternalStringComparer as ::unity::ClassIdentity>::NAME,
68                        "Equals",
69                    )
70                });
71                let __inner: extern "C" fn(InternalStringComparer, ::unity::Il2CppString, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
72                    ::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(x), ::core::convert::Into::into(y), __mi)
75            }
76        }
77    }
78    #[doc = "`IndexOf(::unity::Array<::unity::Il2CppString>, ::unity::Il2CppString, i32, i32)` overload"]
79    fn index_of(
80        self,
81        array: impl ::core::convert::Into<::unity::Array<::unity::Il2CppString>>,
82        value: impl ::core::convert::Into<::unity::Il2CppString>,
83        start_index: impl ::core::convert::Into<i32>,
84        count: impl ::core::convert::Into<i32>,
85    ) -> i32 {
86        unsafe {
87            let __receiver =
88                <InternalStringComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
89            {
90                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
91                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
92                    panic!(
93                        "unity: virtual slot {}
94 out of range (vtable len {}
95) on the runtime class behind {}
96 (method `{}
97`)",
98                        10usize,
99                        __vt.len(),
100                        <InternalStringComparer as ::unity::ClassIdentity>::NAME,
101                        "IndexOf",
102                    )
103                });
104                let __inner: extern "C" fn(
105                    InternalStringComparer,
106                    ::unity::Array<::unity::Il2CppString>,
107                    ::unity::Il2CppString,
108                    i32,
109                    i32,
110                    ::unity::OptionalMethod,
111                ) -> i32 = ::core::mem::transmute(__vi.method_ptr);
112                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
113                __inner(
114                    __receiver,
115                    ::core::convert::Into::into(array),
116                    ::core::convert::Into::into(value),
117                    ::core::convert::Into::into(start_index),
118                    ::core::convert::Into::into(count),
119                    __mi,
120                )
121            }
122        }
123    }
124    #[doc = "`.ctor()` overload"]
125    fn ctor(self) -> () {
126        unsafe {
127            let __receiver =
128                <InternalStringComparer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
129            ::unity::il2cpp_call!((::unity::module_base()+0x3263700usize)as*mut u8,();
130(InternalStringComparer)__receiver)
131        }
132    }
133}
134
135#[cfg(feature = "system-collections-generic-internalstringcomparer")]
136impl<__T: IInternalStringComparer> IInternalStringComparerMethods for __T {}
137
138#[cfg(feature = "system-collections-generic-internalstringcomparer")]
139impl InternalStringComparer {
140    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
141        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
142    }
143
144    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
145        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
146    }
147
148    pub fn index_of_method_info() -> &'static ::unity::il2cpp::MethodInfo {
149        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
150    }
151
152    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
153        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
154    }
155}
156
157#[cfg(feature = "system-collections-generic-internalstringcomparer")]
158impl InternalStringComparer {
159    #[doc = "Direct (non-virtual) call to `InternalStringComparer`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
160    pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>, obj: ::unity::Il2CppString) -> i32 {
161        let __mi = Self::get_hash_code_method_info();
162        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> i32 =
163            ::core::mem::transmute(__mi.method_ptr);
164        __inner(this.into(), obj, ::core::option::Option::None)
165    }
166
167    #[doc = "Direct (non-virtual) call to `InternalStringComparer`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
168    pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, x: ::unity::Il2CppString, y: ::unity::Il2CppString) -> bool {
169        let __mi = Self::equals_method_info();
170        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
171            ::core::mem::transmute(__mi.method_ptr);
172        __inner(this.into(), x, y, ::core::option::Option::None)
173    }
174
175    #[doc = "Direct (non-virtual) call to `InternalStringComparer`'s own `IndexOf`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
176    pub unsafe fn index_of(
177        this: impl ::core::convert::Into<::unity::IlInstance>,
178        array: ::unity::Array<::unity::Il2CppString>,
179        value: ::unity::Il2CppString,
180        start_index: i32,
181        count: i32,
182    ) -> i32 {
183        let __mi = Self::index_of_method_info();
184        let __inner: extern "C" fn(
185            ::unity::IlInstance,
186            ::unity::Array<::unity::Il2CppString>,
187            ::unity::Il2CppString,
188            i32,
189            i32,
190            ::unity::OptionalMethod,
191        ) -> i32 = ::core::mem::transmute(__mi.method_ptr);
192        __inner(this.into(), array, value, start_index, count, ::core::option::Option::None)
193    }
194}
195
196#[cfg(feature = "system-collections-generic-internalstringcomparer")]
197impl InternalStringComparer {
198    #[doc = "`.ctor()` — no args"]
199    pub fn new() -> Self {
200        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
201            panic!(
202                "{}
203::{}
204 failed to instantiate",
205                ::core::stringify!(InternalStringComparer),
206                ::core::stringify!(new),
207            )
208        });
209        <Self as IInternalStringComparerMethods>::ctor(this);
210        this
211    }
212}
213
214#[cfg(feature = "system-collections-generic-internalstringcomparer")]
215#[doc(hidden)]
216pub mod prelude {
217    pub use super::{IInternalStringComparer, IInternalStringComparerMethods, InternalStringComparer};
218    #[cfg(feature = "system-collections-generic-equalitycomparer_1")]
219    pub use crate::system::collections::generic::equalitycomparer_1::IEqualityComparer_1Methods;
220    #[cfg(feature = "system-object")]
221    pub use crate::system::object::IObjectMethods;
222    pub use crate::system::{collections::generic::equalitycomparer_1::IEqualityComparer_1, object::IObject};
223}