datex_core/values/value_container/
datex_proxy.rs1use crate::{
2 datex_proxy::{
3 DatexProxyTypes, DatexValueContainerProxy,
4 DatexValueContainerProxyDeserialize,
5 DatexValueContainerProxyInfallibleSerialize,
6 DatexValueContainerProxySerialize, TryFromDatexValueError,
7 TryToDatexValueError,
8 },
9 libs::core::type_id::CoreLibBaseTypeId,
10 runtime::cache::shared_references_cache::SharedReferencesCache,
11 types::{r#type::Type, type_definition::TypeDefinition},
12 values::value_container::ValueContainer,
13};
14
15impl DatexValueContainerProxyInfallibleSerialize for ValueContainer {
16 fn to_value_container(self) -> ValueContainer {
17 self
18 }
19}
20impl DatexValueContainerProxySerialize for ValueContainer {
21 fn try_to_value_container(
22 self,
23 ) -> Result<ValueContainer, TryToDatexValueError> {
24 Ok(self)
25 }
26}
27impl DatexValueContainerProxyDeserialize for ValueContainer {
28 fn try_from_value_container(
29 value: ValueContainer,
30 ) -> Result<Self, TryFromDatexValueError> {
31 Ok(value)
32 }
33}
34
35impl DatexProxyTypes for ValueContainer {
36 fn datex_type(_memory: &mut SharedReferencesCache) -> Type {
37 Type::Alias(
38 TypeDefinition::CoreType(CoreLibBaseTypeId::Unknown.into()).into(),
39 )
40 }
41}
42
43impl DatexValueContainerProxy for ValueContainer {}