Skip to main content

Value

Enum Value 

Source
pub enum Value {
    Core(CoreValueWithClassification),
    Native(NativeCoreValue),
}
Expand description

Represents a local DATEX value. This can either be a core value with classification or a native rust value that provides all trait implementations.

Variants§

§

Core(CoreValueWithClassification)

Core value with classification

§

Native(NativeCoreValue)

Native rust value with DATEX representation

Implementations§

Source§

impl Value

Source

pub fn native(value: impl DatexNative) -> Value

Creates a new Value from a native value that implements the DatexNative trait.

Source

pub fn native_boxed(value: Box<dyn DatexNative>) -> Value

Source

pub fn core(inner: impl Into<CoreValueWithClassification>) -> Self

Source

pub fn core_with_classification( inner: impl Into<CoreValue>, classification: ValueClassification, ) -> Self

Source

pub fn is_collection_value(&self) -> bool

Source

pub fn null() -> Self

Source

pub fn uninitialized() -> Self

Source

pub fn classification( &self, cache: &mut SharedReferencesCache, ) -> ValueClassification

Returns the classification of the value, which includes its entity type, impls, and tag.

Source

pub fn unresolved_classification(&self) -> UnresolvedValueClassification

Returns the unresolved classification of the value, which includes its entity type, impls, and tag. In contrast to classification, this method does not require a mutable reference to a cache and only returns an address for an entity type if it is present, without resolving it to a full type.

Source

pub fn new(inner: impl ConvertValue) -> Self

Source

pub fn is_native(&self) -> bool

Checks if the inner CoreValue of the Value is a [CoreValue::Native].

Source

pub fn is_uninitialized(&self) -> bool

Source

pub fn without_local_observers(self) -> Value

Strips any local observers from the given value container. This method should be called when a value is moved from its [SharedContainer] parent.

Source

pub fn boxed(value: impl Into<ValueContainer>) -> Self

Creates a new Value representing a boxed value. This can be used to wrap a ValueContainer directly into a local Value, e.g. for #Tagged(shared X) or (X | null) | null

Source

pub fn unbox(self) -> Result<ValueContainer, Value>

Source

pub fn try_as<T>(&self) -> Option<&T>
where T: ConvertValue + ?Sized,

Tries to get a borrow of the current value as the specified type. Does not perform any type conversion.

Source

pub fn try_as_mut<T>(&mut self) -> Option<&mut T>
where T: ConvertValue,

Source

pub fn try_as_str(&self) -> Option<&str>

Tries to get an immutable reference to the value as a string slice. Does not perform any type conversion. In contrast to Value::try_as::(), this method also works for Text values containing a static string slice.

Source

pub fn try_into_value<T>(self) -> Result<T, Value>
where T: ConvertValue,

Tries to convert the current value into the specific specified type. Does not perform any type conversion.

Source

pub fn try_convert_into_value<T>(self) -> Result<T, ()>

Tries to convert the current value into the specific specified type. Performs a cast between native and core values if necessary, e.g. converting a CoreValue::Map into a native rust struct.

Source

pub fn try_as_core_value(&self) -> Option<&CoreValue>

Tries to get a reference to the inner CoreValue if the Value is a Value::Core variant.

Source

pub fn try_as_core_value_mut(&mut self) -> Option<&mut CoreValue>

Tries to get a mutable reference to the inner CoreValue if the Value is a Value::Core variant.

Source

pub fn try_into_core_value(self) -> Result<CoreValue, Value>

Tries to convert the current value into a CoreValue if the Value is a Value::Core variant.

Source§

impl Value

Source

pub fn callable( name: Option<String>, signature: CallableTypeDefinition, body: CallableBody, creator: Endpoint, ) -> Self

Source

pub fn is_null(&self) -> bool

Source

pub fn downcast_native<T: DatexNative>(self) -> Option<Box<T>>

Tries to downcast the CoreValue to a native value of type T. This method will return Some(Box) if the CoreValue is a Native variant and the underlying value can be downcast to T.

Source

pub fn downcast_native_ref<T: DatexNative>(&self) -> Option<&T>

Tries to downcast the CoreValue to a reference of a native value of type T. This method will return Some(&T) if the CoreValue is a Native variant and the underlying value can be downcast to T.

Source

pub fn downcast_native_mut<T: DatexNative>(&mut self) -> Option<&mut T>

Tries to downcast the CoreValue to a mutable reference of a native value of type T. This method will return Some(&mut T) if the CoreValue is a Native variant and the underlying value can be downcast to T.

Source

pub fn try_get_property( &self, key: &ValueContainer, ) -> Result<BorrowedValueContainer<'_>, AccessError>

Gets a property on the value if applicable (e.g. for map and structs)

Source

pub fn try_get_property_mut( &mut self, key: &ValueContainer, ) -> Result<BorrowedValueContainerMut<'_>, AccessError>

Source

pub fn actual_type(&self) -> TypeDefinition

Returns the actual current TypeDefinition of the value

Trait Implementations§

Source§

impl Add for &Value

Source§

type Output = Result<Value, ValueError>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Value) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for Value

Source§

type Output = Result<Value, ValueError>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Value) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> AddAssign<T> for Value
where Value: From<T>,

Source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
Source§

impl Apply for Value

Source§

fn try_apply_sync( &self, runtime: &Runtime, args: Vec<ApplyArgument>, ) -> Result<(Option<ValueContainer>, Vec<ValueContainer>), ApplyError>

Applies multiple ValueContainer arguments to self Returns an Error if the value does not support sync apply. The return value is a tuple of the return value of the apply operation, and a vector containing all value containers for apply arguments that were passed as local references. Note: the count of the returned Vec corresponds to the count of arguments that have [passed_as_ref] set to true.
Source§

async fn try_apply_async( &self, runtime: &Runtime, args: Vec<ApplyArgument>, ) -> Result<(Option<ValueContainer>, Vec<ValueContainer>), ApplyError>

Applies multiple ValueContainer arguments to self on a sync or async callable. The return value is a tuple of the return value of the apply operation, and a vector containing all value containers for apply arguments that were passed as local references. Note: the count of the returned Vec corresponds to the count of arguments that have [passed_as_ref] set to true.
Source§

fn try_apply_sync_checked( &self, runtime: &Runtime, args: Vec<ApplyArgument>, ) -> Result<(Option<ValueContainer>, Vec<ValueContainer>), ApplyError>

Calls the [try_apply_sync] method and checks that the number of returned local references matches the number of arguments that were passed as local references.
Source§

async fn try_apply_async_checked( &self, runtime: &Runtime, args: Vec<ApplyArgument>, ) -> Result<(Option<ValueContainer>, Vec<ValueContainer>), ApplyError>

Calls the [try_apply_async] method and checks that the number of returned local references matches the number of arguments that were passed as local references.
Source§

impl Classification for Value

Source§

fn entity_type(&self, cache: &mut SharedReferencesCache) -> Option<EntityType>

Returns the DATEX EntityType of the native value if it has an entity type. For structural types, this will return None. The default implementation returns None, indicating that the value does not have an entity type.
Source§

fn entity_type_address(&self) -> Option<PointerAddress>

Returns the PointerAddress of the entity type if it has one. The default implementation returns None, indicating that the value does not have an entity type address. It must be ensured that the entity type for the given address is already registered in the runtime.
Source§

fn tag(&self) -> Option<ValueTag>

Returns a ValueTag if the value has a tag. The default implementation returns None, indicating that the value does not have a tag.
Source§

fn impls(&self) -> Vec<PointerAddress>

Returns a list of PointerAddresses of the impls associated with the value. The default implementation returns an empty list, indicating that the value does not have any impls.
Source§

fn classification( &self, cache: &mut SharedReferencesCache, ) -> ValueClassification

Returns the DATEX ValueClassification of the native value. This tries to resolve the entity type and tag, assuming at most one of them is present.
Source§

fn unresolved_classification(&self) -> UnresolvedValueClassification

Returns the unresolved DATEX UnresolvedValueClassification of the native value. This does not try to resolve the entity, but instead returns the address of the entity type if it has one.
Source§

impl Clone for Value

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ConvertValueContainer for Value

Source§

fn to_value_container(self) -> ValueContainer

Convert the value to a ValueContainer
Source§

fn as_borrowed_value_container(&self) -> BorrowedValueContainer<'_>

Borrow the value as a BorrowedValueContainer
Source§

fn as_borrowed_value_container_mut(&mut self) -> BorrowedValueContainerMut<'_>

Borrow the value as a mutable BorrowedValueContainer
Source§

fn try_from_value_container( value_container: ValueContainer, ) -> Result<Self, ValueContainer>
where Self: Sized,

Tries to downcast a ValueContainer into Self
Source§

fn try_borrow_from_value_container( value_container: &ValueContainer, ) -> Result<&Self, ()>
where Self: Sized,

Tries to downcast a ValueContainer into a reference of Self
Source§

fn try_borrow_mut_from_value_container( value_container: &mut ValueContainer, ) -> Result<&mut Self, ()>
where Self: Sized,

Tries to downcast a ValueContainer into a mutable reference of Self
Source§

fn try_from_bytes( dxb: Vec<u8>, runtime: &Runtime, ) -> Result<Self, DeserializationError>
where Self: Sized + FromParts,

Deserialize a value of type T from a byte slice containing DXB data
Source§

fn try_convert_from_value_container( value_container: ValueContainer, ) -> Result<Self, ()>
where Self: FromParts + Sized,

Tries to cast a ValueContainer into the specified type [T]. First, it attempts a direct conversion (downcast) of the ValueContainer into the type [T]. If that fails, it tries to convert the ValueContainer into map or list parts and then into the type [T].
Source§

impl DatexHash for Value

Source§

fn datex_hash(&self, state: &mut dyn Hasher)

Source§

fn datex_hash_default(&self) -> u64

Source§

impl DatexNative for Value

Source§

fn as_any(&self) -> &dyn Any

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Source§

fn type_name(&self) -> &'static str

Source§

impl DatexNativeOps for Value

Source§

fn add_native(&self, _rhs: &dyn DatexNative) -> Option<Box<dyn DatexNative>>

Source§

impl Debug for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Value

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'de> DeserializeWithSerdeContext<'de> for Value

Source§

fn deserialize_with_ctx<D>( ctx: &SerdeContext<'_>, deserializer: D, ) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Source§

impl Display for Value

Available on non-crate feature value_display only.
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Value

Source§

impl<'a> From<&'a Value> for BorrowedValue<'a>

Source§

fn from(value: &'a Value) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Value> for BorrowedValueContainer<'a>

Source§

fn from(value: &'a Value) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut Value> for BorrowedValue<'a>

Source§

fn from(value: &'a mut Value) -> Self

Converts to this type from the input type.
Source§

impl From<&'static str> for Value

Source§

fn from(value: &'static str) -> Self

Converts to this type from the input type.
Source§

impl<T: ConvertValue> From<T> for Value

Source§

fn from(inner: T) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for InstructionInput

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl FromParts for Value

Source§

fn try_from_map_parts_with_tag( parts: Map, tag: Option<&str>, ) -> Result<Self, ()>
where Self: Sized,

Source§

fn try_from_list_parts_with_tag( parts: List, tag: Option<&str>, ) -> Result<Self, ()>
where Self: Sized,

Source§

fn try_from_single_value_with_tag( value: ValueContainer, tag: Option<&str>, ) -> Result<Self, ()>
where Self: Sized,

Source§

fn try_from_map_parts(_parts: Map) -> Result<Self, ()>
where Self: Sized,

Tries to construct the implementing type from the given map parts.
Source§

fn try_from_list_parts(_parts: List) -> Result<Self, ()>
where Self: Sized,

Tries to construct the implementing type from the given list parts.
Source§

fn try_from_single_value(_value: ValueContainer) -> Result<Self, ()>
where Self: Sized,

Tries to construct the implementing type from a single value.
Source§

impl GetCoreLibTypeId for Value

Source§

impl GetDatexType for Value

Source§

impl HasPartsKind for Value

Source§

fn parts_kind(&self) -> PartsKind

Returns the kind of parts that the implementing type can be converted into. This can be used to check if the conversion is possible before attempting it. If this returns PartsKind::None, then the conversion is not possible. If this returns PartsKind::List, then the conversion is possible and try_into_list_parts() can be called. If this returns PartsKind::Map, then the conversion is possible and try_into_map_parts() can be called. If this returns PartsKind::SingleValue, then the conversion is possible and try_from_single_value() can be called.
Source§

impl Hash for Value

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl InternalMutabilityUpdateHandler for Value

Source§

fn set_update_callback_data(&mut self, observe_data: Option<UpdateCallbackData>)

Source§

fn set_child_update_callback_data( &self, child_key: impl Into<ValueContainer>, child_value: &mut Value, )

Updates the update callback data for a child value based on the current update callback data of the parent.
Source§

fn set_child_update_callback_data_if_local( &self, child_key: &(impl Into<ValueContainer> + Clone), child_value: &mut ValueContainer, )

Updates the update callback data for a child value if it is a ValueContainer::Local, based on the current update callback data of the parent.
Source§

fn maybe_trigger_update_callback( &self, source_id: Option<TransceiverId>, update_operation_generator: impl FnOnce() -> UpdateOperation, )

Triggers the update callback if the source_id is provided and the callback data is available.
Source§

impl IntoParts for Value

Source§

fn try_into_map_parts<'a>(self: Box<Self>) -> Result<Map, ()>
where Self: 'a,

Converts the implementing type into its map parts. Returns an error if the conversion is not possible. You can check if the conversion is possible by calling parts_kind() and checking if it returns PartsKind::Map.
Source§

fn try_into_list_parts<'a>(self: Box<Self>) -> Result<List, ()>
where Self: 'a,

Converts the implementing type into its list parts. Returns an error if the conversion is not possible. You can check if the conversion is possible by calling parts_kind() and checking if it returns PartsKind::List.
Source§

fn try_into_single_value<'a>(self: Box<Self>) -> Result<ValueContainer, ()>
where Self: 'a,

Converts the implementing type into a single value. Returns an error if the conversion is not possible. You can check if the conversion is possible by calling parts_kind() and checking if it returns PartsKind::SingleValue.
Source§

impl IterParts for Value

Source§

fn iter_list_parts<'a>( &'a self, ) -> Option<Box<dyn Iterator<Item = BorrowedValueContainer<'a>> + 'a>>

Source§

fn iter_list_parts_mut<'a>( &'a mut self, ) -> Option<Box<dyn Iterator<Item = BorrowedValueContainerMut<'a>> + 'a>>

Source§

fn iter_map_parts<'a>( &'a self, ) -> Option<Box<dyn Iterator<Item = (BorrowedValueContainer<'a>, BorrowedValueContainer<'a>)> + 'a>>

Source§

fn iter_map_parts_mut<'a>( &'a mut self, ) -> Option<Box<dyn Iterator<Item = (BorrowedValueContainer<'a>, BorrowedValueContainerMut<'a>)> + 'a>>

Source§

fn iter_parts<'a>( &'a self, ) -> Option<Box<dyn Iterator<Item = BorrowedValueContainer<'a>> + 'a>>

Source§

impl LocalChildPathResolver for Value

Source§

fn resolve_child( &mut self, _key: &ValueContainer, ) -> Result<&mut ValueContainer, UpdateError>

Source§

fn resolve_value_for_path( &mut self, first: &ValueContainer, remaining_path: &[ValueContainer], ) -> Result<&mut Value, UpdateError>

Source§

impl Neg for Value

Source§

type Output = Result<Value, ValueError>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Not for &Value

Source§

type Output = Option<Value>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation using logical or bitwise negation. Read more
Source§

impl Not for Value

Source§

type Output = Option<Value>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation using logical or bitwise negation. Read more
Source§

impl PartialEq for Value

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Value

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SerializeWithSerdeContext for Value

Serialization for Value.

Source§

fn serialize_with_ctx<S>( &self, ctx: &SerdeContext<'_>, serializer: S, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Source§

impl StructuralEq for Value

Two values are structurally equal, if their inner values are structurally equal, regardless of the actual_type of the values

Source§

fn structural_eq(&self, other: &Self) -> bool

Check if two values are equal, ignoring the type.
Source§

impl Sub for &Value

Source§

type Output = Result<Value, ValueError>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Value) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for Value

Source§

type Output = Result<Value, ValueError>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Value) -> Self::Output

Performs the - operation. Read more
Source§

impl ToInstructions for Value

Source§

fn to_instructions<'a>( &'a self, visitor: &'a mut dyn ValueVisitor, cache: &'a mut SharedReferencesCache, ) -> Box<dyn Iterator<Item = Instruction> + 'a>

Source§

impl TryClone for Value

Source§

fn try_clone(&self) -> Result<Value, ()>

Attempts to clone Self into a new Value.
Source§

impl<'a, T> TryFrom<&'a Value> for Option<&'a T>
where T: DatexNativeBase + ConvertValue + 'static,

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Value> for &'a str

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a, T> TryFrom<&'a mut Value> for Option<&'a mut T>
where T: DatexNativeBase + ConvertValue + 'static,

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a mut Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut Value> for BorrowedValueMut<'a>

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a mut Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl UpdateCallbackDataAccess for Value

Source§

impl UpdateHandlerImpl for Value

Source§

impl ValueAccess for Value

Source§

fn try_get_property( &self, key: &ValueContainer, ) -> Result<BorrowedValueContainer<'_>, AccessError>

Gets a reference to a property on the value if applicable (e.g. for map and structs). This method returns a BorrowedValueContainer which can be either a ValueContainer or a [Callable] value.
Source§

fn try_get_property_mut( &mut self, key: &ValueContainer, ) -> Result<BorrowedValueContainerMut<'_>, AccessError>

Gets a mutable reference to a property on the value if applicable (e.g. for map and structs)
Source§

impl ValueEq for Value

Value equality corresponds to partial equality: Both type and inner value are the same

Source§

fn value_eq(&self, other: &Self) -> bool

Check if two values are exactly equal, including the type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Value

§

impl !Send for Value

§

impl !Sync for Value

§

impl !UnwindSafe for Value

§

impl Forget for Value

§

impl Freeze for Value

§

impl Move for Value

§

impl Unpin for Value

§

impl UnsafeUnpin for Value

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DatexNativeBase for T

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DeserializeWithSerdeContextDyn for T
where T: for<'de> DeserializeWithSerdeContext<'de>,

Source§

fn deserialize_with_ctx_dyn<'de>( ctx: &SerdeContext<'_>, deserializer: &mut dyn Deserializer<'de>, ) -> Result<T, Error>

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> DynEq for T
where T: Any,

Source§

default fn dyn_eq(&self, _other: &(dyn Any + 'static)) -> bool

Source§

impl<T> DynEq for T
where T: Any + PartialEq + Debug + DatexNative,

Source§

fn dyn_eq(&self, other: &(dyn Any + 'static)) -> bool

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetAllowedType for T
where T: GetDatexType,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> SerializeWithSerdeContextDyn for T

Source§

fn with_ctx<'a>(&'a self, ctx: &'a SerdeContext<'a>) -> Box<dyn Serialize + 'a>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToShared for T
where T: DatexNative,

Source§

fn shared_with_cache_and_address_provider( self, cache: &mut SharedReferencesCache, provider: &mut SelfOwnedPointerAddressProvider, ) -> Shared<Self>

Source§

fn shared(self, runtime: &Runtime) -> Shared<Self>

Creates a Shared value containing Self
Source§

fn shared_ref_with_cache_and_address_provider( self, cache: &mut SharedReferencesCache, provider: &mut SelfOwnedPointerAddressProvider, ) -> SharedRef<Self>

Source§

fn shared_ref(self, runtime: &Runtime) -> SharedRef<Self>

Creates a SharedRef value containing Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> TryClone for T

Source§

default fn try_clone(&self) -> Result<Value, ()>

Attempts to clone Self into a new Value.
Source§

impl<T> TryClone for T
where T: Clone + DatexNative,

Source§

default fn try_clone(&self) -> Result<Value, ()>

Attempts to clone Self into a new Value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TypeSubset<U> for T
where U: TypeSuperset<T>,

Source§

fn is_subset_of(&self, other: &U) -> bool

Returns whether self is a subset of type