datex_core/values/value/
datex_proxy.rs1use crate::{
2 datex_proxy::{
3 DatexProxyTypes, DatexValueProxy, DatexValueProxyDeserialize,
4 DatexValueProxyInfallibleSerialize, DatexValueProxySerialize,
5 TryFromDatexValueError, TryToDatexValueError,
6 },
7 libs::core::type_id::CoreLibBaseTypeId,
8 runtime::cache::shared_references_cache::SharedReferencesCache,
9 types::{r#type::Type, type_definition::TypeDefinition},
10 values::value::Value,
11};
12
13impl DatexValueProxyInfallibleSerialize for Value {
14 fn to_value(self) -> Value {
15 self
16 }
17}
18impl DatexValueProxySerialize for Value {
19 fn try_to_value(self) -> Result<Value, TryToDatexValueError> {
20 Ok(self)
21 }
22}
23impl DatexValueProxyDeserialize for Value {
24 fn try_from_value(value: Value) -> Result<Self, TryFromDatexValueError> {
25 Ok(value)
26 }
27}
28
29impl DatexProxyTypes for Value {
30 fn datex_type(_memory: &mut SharedReferencesCache) -> Type {
31 Type::Alias(
32 TypeDefinition::CoreType(CoreLibBaseTypeId::Unknown.into()).into(),
33 )
34 }
35}
36
37impl DatexValueProxy for Value {}