Skip to main content

engage/generated/moon_sharp/interpreter/
tablepair.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-tablepair-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        valuetype::{IValueType, ValueType},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/tablepair/TablePair.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct TablePair {
17        pub key: crate::moon_sharp::interpreter::dynvalue::DynValue,
18        pub value: crate::moon_sharp::interpreter::dynvalue::DynValue,
19    }
20    impl ::unity::ClassIdentity for TablePair {
21        const NAME: &'static str = "TablePair";
22        const NAMESPACE: &'static str = "MoonSharp.Interpreter";
23
24        fn class() -> ::unity::Class {
25            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27        }
28    }
29    impl ::unity::IlType for TablePair {
30        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32        }
33    }
34    impl TablePair {
35        #[inline]
36        pub fn s_nil_node() -> crate::moon_sharp::interpreter::tablepair::TablePair {
37            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
38            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "s_NilNode");
39            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
40        }
41
42        #[inline]
43        pub fn set_s_nil_node(value: crate::moon_sharp::interpreter::tablepair::TablePair) {
44            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
45            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "s_NilNode");
46            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
47        }
48    }
49}
50
51#[cfg(feature = "moon_sharp-interpreter-tablepair-types")]
52pub use __types::*;
53
54#[cfg(feature = "moon_sharp-interpreter-tablepair")]
55#[doc(hidden)]
56#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
57mod __TablePair_unity_raw {
58    use super::*;
59    #[doc(hidden)]
60    #[allow(non_snake_case)]
61    pub mod __lookup_get_key {
62        use super::*;
63        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
64            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
65            ::unity::lookup::method_info_on_class_with_signature(<TablePair as ::unity::ClassIdentity>::class(), "get_Key", 0, param_types, false)
66        });
67        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
68            match &*METHOD {
69                ::core::result::Result::Ok(mi) => *mi,
70                ::core::result::Result::Err(e) => {
71                    panic!(
72                        "method lookup failed: {}
73::{}
74: {}
75",
76                        <TablePair as ::unity::ClassIdentity>::NAME,
77                        "get_Key",
78                        e
79                    )
80                },
81            }
82        }
83    }
84    #[doc(hidden)]
85    #[allow(non_snake_case)]
86    pub mod __lookup_set_key {
87        use super::*;
88        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
89            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
90                &[<crate::moon_sharp::interpreter::dynvalue::DynValue as ::unity::IlType>::il_type()];
91            ::unity::lookup::method_info_on_class_with_signature(<TablePair as ::unity::ClassIdentity>::class(), "set_Key", 1, param_types, false)
92        });
93        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
94            match &*METHOD {
95                ::core::result::Result::Ok(mi) => *mi,
96                ::core::result::Result::Err(e) => {
97                    panic!(
98                        "method lookup failed: {}
99::{}
100: {}
101",
102                        <TablePair as ::unity::ClassIdentity>::NAME,
103                        "set_Key",
104                        e
105                    )
106                },
107            }
108        }
109    }
110    #[doc(hidden)]
111    #[allow(non_snake_case)]
112    pub mod __lookup_get_value {
113        use super::*;
114        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
115            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
116            ::unity::lookup::method_info_on_class_with_signature(<TablePair as ::unity::ClassIdentity>::class(), "get_Value", 0, param_types, false)
117        });
118        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
119            match &*METHOD {
120                ::core::result::Result::Ok(mi) => *mi,
121                ::core::result::Result::Err(e) => {
122                    panic!(
123                        "method lookup failed: {}
124::{}
125: {}
126",
127                        <TablePair as ::unity::ClassIdentity>::NAME,
128                        "get_Value",
129                        e
130                    )
131                },
132            }
133        }
134    }
135    #[doc(hidden)]
136    #[allow(non_snake_case)]
137    pub mod __lookup_set_value {
138        use super::*;
139        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
140            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
141                &[<crate::moon_sharp::interpreter::dynvalue::DynValue as ::unity::IlType>::il_type()];
142            ::unity::lookup::method_info_on_class_with_signature(<TablePair as ::unity::ClassIdentity>::class(), "set_Value", 1, param_types, false)
143        });
144        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
145            match &*METHOD {
146                ::core::result::Result::Ok(mi) => *mi,
147                ::core::result::Result::Err(e) => {
148                    panic!(
149                        "method lookup failed: {}
150::{}
151: {}
152",
153                        <TablePair as ::unity::ClassIdentity>::NAME,
154                        "set_Value",
155                        e
156                    )
157                },
158            }
159        }
160    }
161    #[doc(hidden)]
162    #[allow(non_snake_case)]
163    pub mod __lookup_ctor {
164        use super::*;
165        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
166            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
167                <crate::moon_sharp::interpreter::dynvalue::DynValue as ::unity::IlType>::il_type(),
168                <crate::moon_sharp::interpreter::dynvalue::DynValue as ::unity::IlType>::il_type(),
169            ];
170            ::unity::lookup::method_info_on_class_with_signature(<TablePair as ::unity::ClassIdentity>::class(), ".ctor", 2, param_types, false)
171        });
172        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
173            match &*METHOD {
174                ::core::result::Result::Ok(mi) => *mi,
175                ::core::result::Result::Err(e) => {
176                    panic!(
177                        "method lookup failed: {}
178::{}
179: {}
180",
181                        <TablePair as ::unity::ClassIdentity>::NAME,
182                        ".ctor",
183                        e
184                    )
185                },
186            }
187        }
188    }
189    #[doc(hidden)]
190    #[allow(non_snake_case)]
191    pub mod __lookup_get_nil {
192        use super::*;
193        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
194            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
195            ::unity::lookup::method_info_on_class_with_signature(<TablePair as ::unity::ClassIdentity>::class(), "get_Nil", 0, param_types, true)
196        });
197        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198            match &*METHOD {
199                ::core::result::Result::Ok(mi) => *mi,
200                ::core::result::Result::Err(e) => {
201                    panic!(
202                        "method lookup failed: {}
203::{}
204: {}
205",
206                        <TablePair as ::unity::ClassIdentity>::NAME,
207                        "get_Nil",
208                        e
209                    )
210                },
211            }
212        }
213    }
214    #[doc(hidden)]
215    #[allow(non_snake_case)]
216    pub mod __lookup_cctor {
217        use super::*;
218        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
219            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
220            ::unity::lookup::method_info_on_class_with_signature(<TablePair as ::unity::ClassIdentity>::class(), ".cctor", 0, param_types, true)
221        });
222        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
223            match &*METHOD {
224                ::core::result::Result::Ok(mi) => *mi,
225                ::core::result::Result::Err(e) => {
226                    panic!(
227                        "method lookup failed: {}
228::{}
229: {}
230",
231                        <TablePair as ::unity::ClassIdentity>::NAME,
232                        ".cctor",
233                        e
234                    )
235                },
236            }
237        }
238    }
239}
240
241#[cfg(feature = "moon_sharp-interpreter-tablepair")]
242impl TablePair {
243    #[doc = "`get_Nil()` overload"]
244    pub fn get_nil() -> crate::moon_sharp::interpreter::tablepair::TablePair {
245        unsafe {
246            ::unity::il2cpp_call!(__TablePair_unity_raw::__lookup_get_nil::get_method_info().method_ptr,crate::moon_sharp::interpreter::tablepair::TablePair;
247            )
248        }
249    }
250
251    #[doc = "`.cctor()` overload"]
252    pub fn cctor() -> () {
253        unsafe {
254            ::unity::il2cpp_call!(__TablePair_unity_raw::__lookup_cctor::get_method_info().method_ptr,();
255            )
256        }
257    }
258}
259
260#[cfg(feature = "moon_sharp-interpreter-tablepair")]
261impl TablePair {
262    #[doc = "`get_Key()` overload"]
263    pub fn get_key(&mut self) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
264        unsafe {
265            ::unity::il2cpp_call!(::unity::callable_ptr(__TablePair_unity_raw::__lookup_get_key::get_method_info().method_ptr),crate::moon_sharp::interpreter::dynvalue::DynValue;
266(*mut TablePair)self as*mut TablePair)
267        }
268    }
269
270    #[doc = "`set_Key(crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
271    pub fn set_key(&mut self, value: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>) -> () {
272        unsafe {
273            ::unity::il2cpp_call!(::unity::callable_ptr(__TablePair_unity_raw::__lookup_set_key::get_method_info().method_ptr),();
274(*mut TablePair)self as*mut TablePair,(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value))
275        }
276    }
277
278    #[doc = "`get_Value()` overload"]
279    pub fn get_value(&mut self) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
280        unsafe {
281            ::unity::il2cpp_call!(::unity::callable_ptr(__TablePair_unity_raw::__lookup_get_value::get_method_info().method_ptr),crate::moon_sharp::interpreter::dynvalue::DynValue;
282(*mut TablePair)self as*mut TablePair)
283        }
284    }
285
286    #[doc = "`set_Value(crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
287    pub fn set_value(&mut self, value: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>) -> () {
288        unsafe {
289            ::unity::il2cpp_call!(::unity::callable_ptr(__TablePair_unity_raw::__lookup_set_value::get_method_info().method_ptr),();
290(*mut TablePair)self as*mut TablePair,(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value))
291        }
292    }
293
294    #[doc = "`.ctor(crate::moon_sharp::interpreter::dynvalue::DynValue, crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
295    pub fn ctor(
296        &mut self,
297        key: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>,
298        val: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>,
299    ) -> () {
300        unsafe {
301            ::unity::il2cpp_call!(::unity::callable_ptr(__TablePair_unity_raw::__lookup_ctor::get_method_info().method_ptr),();
302(*mut TablePair)self as*mut TablePair,(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(key),(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(val))
303        }
304    }
305}
306
307#[cfg(feature = "moon_sharp-interpreter-tablepair")]
308impl TablePair {
309    pub fn get_key_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
311    }
312
313    pub fn set_key_method_info() -> &'static ::unity::il2cpp::MethodInfo {
314        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
315    }
316
317    pub fn get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
318        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
319    }
320
321    pub fn set_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
322        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
323    }
324
325    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
326        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
327    }
328
329    pub fn get_nil_method_info() -> &'static ::unity::il2cpp::MethodInfo {
330        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
331    }
332
333    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
334        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
335    }
336}
337
338#[cfg(feature = "moon_sharp-interpreter-tablepair")]
339#[doc(hidden)]
340pub mod prelude {
341    pub use super::TablePair;
342    #[cfg(feature = "system-object")]
343    pub use crate::system::object::IObjectMethods;
344    #[cfg(feature = "system-valuetype")]
345    pub use crate::system::valuetype::IValueTypeMethods;
346    pub use crate::system::{object::IObject, valuetype::IValueType};
347}