Skip to main content

engage/generated/moon_sharp/interpreter/serialization/
objectvalueconverter.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-serialization-objectvalueconverter-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/serialization/objectvalueconverter/ObjectValueConverter.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter.Serialization", name = "ObjectValueConverter")]
12    #[parent(crate::system::object::Object)]
13    pub struct ObjectValueConverter {}
14}
15
16#[cfg(feature = "moon_sharp-interpreter-serialization-objectvalueconverter-types")]
17pub use __types::*;
18
19#[cfg(feature = "moon_sharp-interpreter-serialization-objectvalueconverter")]
20#[doc(hidden)]
21#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
22mod __ObjectValueConverter_unity_raw {
23    use super::*;
24    #[doc(hidden)]
25    #[allow(non_snake_case)]
26    pub mod __lookup_serialize_object_to_dyn_value {
27        use super::*;
28        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
29            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
30                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
31                <crate::system::object::Object as ::unity::IlType>::il_type(),
32                <crate::moon_sharp::interpreter::dynvalue::DynValue as ::unity::IlType>::il_type(),
33            ];
34            ::unity::lookup::method_info_on_class_with_signature(
35                <ObjectValueConverter as ::unity::ClassIdentity>::class(),
36                "SerializeObjectToDynValue",
37                3,
38                param_types,
39                true,
40            )
41        });
42        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
43            match &*METHOD {
44                ::core::result::Result::Ok(mi) => *mi,
45                ::core::result::Result::Err(e) => {
46                    panic!(
47                        "method lookup failed: {}
48::{}
49: {}
50",
51                        <ObjectValueConverter as ::unity::ClassIdentity>::NAME,
52                        "SerializeObjectToDynValue",
53                        e
54                    )
55                },
56            }
57        }
58    }
59}
60
61#[cfg(feature = "moon_sharp-interpreter-serialization-objectvalueconverter")]
62impl ObjectValueConverter {
63    #[doc = "`SerializeObjectToDynValue(crate::moon_sharp::interpreter::script::Script, crate::system::object::Object, crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
64    pub fn serialize_object_to_dyn_value(
65        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
66        o: impl ::core::convert::Into<crate::system::object::Object>,
67        value_for_nulls: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>,
68    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
69        unsafe {
70            ::unity::il2cpp_call!(__ObjectValueConverter_unity_raw::__lookup_serialize_object_to_dyn_value::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
71(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(crate::system::object::Object)::core::convert::Into::into(o),(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value_for_nulls))
72        }
73    }
74}
75
76#[cfg(feature = "moon_sharp-interpreter-serialization-objectvalueconverter")]
77impl ObjectValueConverter {
78    pub fn serialize_object_to_dyn_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
79        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
80    }
81}
82
83#[cfg(feature = "moon_sharp-interpreter-serialization-objectvalueconverter")]
84#[doc(hidden)]
85pub mod prelude {
86    pub use super::{IObjectValueConverter, ObjectValueConverter};
87    pub use crate::system::object::IObject;
88    #[cfg(feature = "system-object")]
89    pub use crate::system::object::IObjectMethods;
90}