pub trait Classification {
// Provided methods
fn entity_type(
&self,
_cache: &mut SharedReferencesCache,
) -> Option<EntityType> { ... }
fn entity_type_address(&self) -> Option<PointerAddress> { ... }
fn tag(&self) -> Option<ValueTag> { ... }
fn impls(&self) -> Vec<PointerAddress> { ... }
fn classification(
&self,
cache: &mut SharedReferencesCache,
) -> ValueClassification { ... }
fn unresolved_classification(&self) -> UnresolvedValueClassification { ... }
}Provided Methods§
Sourcefn entity_type(&self, _cache: &mut SharedReferencesCache) -> Option<EntityType>
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.
Sourcefn entity_type_address(&self) -> Option<PointerAddress>
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.
Sourcefn tag(&self) -> Option<ValueTag>
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.
Sourcefn impls(&self) -> Vec<PointerAddress>
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.
Sourcefn classification(
&self,
cache: &mut SharedReferencesCache,
) -> ValueClassification
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.
Sourcefn unresolved_classification(&self) -> UnresolvedValueClassification
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".