Skip to main content

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

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-collections-generic-keyvaluepair_2-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/system/collections/generic/keyvaluepair_2/KeyValuePair_2.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct KeyValuePair_2<T0, T1> {
17        pub _phantom: ::core::marker::PhantomData<(T0, T1)>,
18    }
19    impl<T0: ::unity::ClassIdentity, T1: ::unity::ClassIdentity> ::unity::ClassIdentity for KeyValuePair_2<T0, T1> {
20        const NAME: &'static str = "KeyValuePair`2";
21        const NAMESPACE: &'static str = "System.Collections.Generic";
22
23        fn class() -> ::unity::Class {
24            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
25            *CACHE.get_or_init(|| {
26                ::unity::Class::lookup(Self::NAMESPACE, Self::NAME)
27                    .make_generic(&[<T0 as ::unity::ClassIdentity>::class(), <T1 as ::unity::ClassIdentity>::class()])
28                    .expect("generic instantiation")
29            })
30        }
31    }
32    impl<T0: ::unity::ClassIdentity, T1: ::unity::ClassIdentity> ::unity::IlType for KeyValuePair_2<T0, T1> {
33        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
34            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
35        }
36    }
37}
38
39#[cfg(feature = "system-collections-generic-keyvaluepair_2-types")]
40pub use __types::*;
41
42#[cfg(feature = "system-collections-generic-keyvaluepair_2")]
43#[::unity::methods(value)]
44impl<T0: ::unity::ClassIdentity, T1: ::unity::ClassIdentity> KeyValuePair_2<T0, T1> {
45    #[doc = "`.ctor(T0, T1)` overload"]
46    #[method(name = ".ctor", args = 2)]
47    pub fn ctor(self, key: T0, value: T1) -> ();
48
49    #[doc = "`get_Key()` overload"]
50    #[method(name = "get_Key", args = 0)]
51    pub fn get_key(self) -> T0;
52
53    #[doc = "`get_Value()` overload"]
54    #[method(name = "get_Value", args = 0)]
55    pub fn get_value(self) -> T1;
56
57    #[doc = "`ToString()` overload"]
58    #[method(name = "ToString", args = 0)]
59    pub fn to_string(self) -> ::unity::Il2CppString;
60}
61
62#[cfg(feature = "system-collections-generic-keyvaluepair_2")]
63#[doc(hidden)]
64pub mod prelude {
65    pub use super::KeyValuePair_2;
66    #[cfg(feature = "system-object")]
67    pub use crate::system::object::IObjectMethods;
68    #[cfg(feature = "system-valuetype")]
69    pub use crate::system::valuetype::IValueTypeMethods;
70    pub use crate::system::{object::IObject, valuetype::IValueType};
71}