pub struct ExtensionRegistry<'p> { /* private fields */ }Expand description
Fixed-capacity, generational registry of VibeNamespaceProvider implementations.
Registration is cold and atomic: if any validation check fails (hash mismatch,
duplicate IRI/alias/ID, q_hash collision, or invalid ontology parity/budget),
the registry remains completely unchanged.
Implementations§
Source§impl ExtensionRegistry<'static>
impl ExtensionRegistry<'static>
Sourcepub fn with_builtin_providers() -> Self
pub fn with_builtin_providers() -> Self
Constructs an ExtensionRegistry pre-populated with all 11 built-in Etalon and Qualia providers:
mech(DeterministicMechanicsProvider)gpu(EtalonGpuComputeProvider)forge(EtalonForgeProvider)render(EtalonRenderProvider)signal(EtalonSignalProvider)sense(EtalonSenseProvider)p64(EtalonModelProvider)nquin(EtalonNQuinProvider)infer(GovernedInferenceProvider)qgraph(StagedGraphMutationProvider)modality(DeonticTemporalProvider)
Source§impl<'p> ExtensionRegistry<'p>
impl<'p> ExtensionRegistry<'p>
Sourcepub const fn generation(&self) -> RegistryGeneration
pub const fn generation(&self) -> RegistryGeneration
Current registry generation counter.
Sourcepub const fn active_count(&self) -> usize
pub const fn active_count(&self) -> usize
Number of currently active providers.
Sourcepub fn register(
&mut self,
provider: &'p dyn VibeNamespaceProvider,
) -> Result<u32, VibeTrap>
pub fn register( &mut self, provider: &'p dyn VibeNamespaceProvider, ) -> Result<u32, VibeTrap>
Atomically validates and registers provider, returning its assigned ns_slot
and advancing self.generation.
Sourcepub fn unregister(&mut self, slot: u32) -> Result<(), VibeTrap>
pub fn unregister(&mut self, slot: u32) -> Result<(), VibeTrap>
Unregisters the provider at slot and advances self.generation so all
previously prepared handles fail closed with VibeTrap::StaleRegistryGeneration.
Sourcepub fn provider_at(&self, slot: u32) -> Option<&'p dyn VibeNamespaceProvider>
pub fn provider_at(&self, slot: u32) -> Option<&'p dyn VibeNamespaceProvider>
Looks up a registered provider by slot index.
Sourcepub fn iter_providers(
&self,
) -> impl Iterator<Item = &'p dyn VibeNamespaceProvider> + '_
pub fn iter_providers( &self, ) -> impl Iterator<Item = &'p dyn VibeNamespaceProvider> + '_
Iterates over all active providers currently registered in the registry.
Sourcepub fn resolve_opcode(
&self,
opcode: VibeOpCode,
) -> Result<(&'p dyn VibeNamespaceProvider, &'static FuncDescriptor), VibeTrap>
pub fn resolve_opcode( &self, opcode: VibeOpCode, ) -> Result<(&'p dyn VibeNamespaceProvider, &'static FuncDescriptor), VibeTrap>
Resolves a (provider, FuncDescriptor) in bounded time from a VibeOpCode.
Sourcepub fn find_by_namespace_or_alias(
&self,
namespace_or_alias: &str,
) -> Option<(u32, &'p dyn VibeNamespaceProvider, &'static ProviderDescriptor)>
pub fn find_by_namespace_or_alias( &self, namespace_or_alias: &str, ) -> Option<(u32, &'p dyn VibeNamespaceProvider, &'static ProviderDescriptor)>
Finds a registered provider by canonical IRI or short alias.
Sourcepub fn find_sub_namespace<'a>(
desc: &'a ProviderDescriptor,
sub_name: &str,
) -> Option<&'a SubNamespaceDescriptor>
pub fn find_sub_namespace<'a>( desc: &'a ProviderDescriptor, sub_name: &str, ) -> Option<&'a SubNamespaceDescriptor>
Iterates over all active provider descriptors.
Sourcepub fn validate_unique_stable_ids(
desc: &ProviderDescriptor,
) -> Result<(), VibeTrap>
pub fn validate_unique_stable_ids( desc: &ProviderDescriptor, ) -> Result<(), VibeTrap>
Checks whether a StableFuncId is duplicated within the same provider.