pub trait ElementTypeDescriptorRegistry:
Send
+ Sync
+ Debug
+ 'static {
// Required method
fn descriptors(&self) -> Vec<ElementTypeDescriptor>;
// Provided methods
fn type_aliases(&self) -> BTreeMap<TypeId, TypeId> { ... }
fn valid_type_ids(&self) -> BTreeSet<TypeId> { ... }
fn descriptor(&self, type_id: &TypeId) -> Option<ElementTypeDescriptor> { ... }
fn has_infrastructure_type(&self) -> bool { ... }
}Expand description
Host-provided catalogue of element-type descriptors.
Only place in the elements layer where dyn Trait appears; it’s an
embedding-system service, not part of the element algebra itself.
Required Methods§
Sourcefn descriptors(&self) -> Vec<ElementTypeDescriptor>
fn descriptors(&self) -> Vec<ElementTypeDescriptor>
Every descriptor the registry knows about.
Provided Methods§
Sourcefn type_aliases(&self) -> BTreeMap<TypeId, TypeId>
fn type_aliases(&self) -> BTreeMap<TypeId, TypeId>
Type aliases that resolve to canonical type ids. Default empty.
Sourcefn valid_type_ids(&self) -> BTreeSet<TypeId>
fn valid_type_ids(&self) -> BTreeSet<TypeId>
Set of valid canonical type ids (derived from Self::descriptors).
Sourcefn descriptor(&self, type_id: &TypeId) -> Option<ElementTypeDescriptor>
fn descriptor(&self, type_id: &TypeId) -> Option<ElementTypeDescriptor>
Look up one descriptor by canonical type id.
Sourcefn has_infrastructure_type(&self) -> bool
fn has_infrastructure_type(&self) -> bool
true when any registered descriptor carries
provides_infrastructure.