Skip to main content

ExtensionRegistry

Struct ExtensionRegistry 

Source
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>

Source

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>

Source

pub const fn new() -> Self

Creates an empty ExtensionRegistry at RegistryGeneration::INITIAL.

Source

pub const fn generation(&self) -> RegistryGeneration

Current registry generation counter.

Source

pub const fn active_count(&self) -> usize

Number of currently active providers.

Source

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.

Source

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.

Source

pub fn provider_at(&self, slot: u32) -> Option<&'p dyn VibeNamespaceProvider>

Looks up a registered provider by slot index.

Source

pub fn iter_providers( &self, ) -> impl Iterator<Item = &'p dyn VibeNamespaceProvider> + '_

Iterates over all active providers currently registered in the registry.

Source

pub fn resolve_opcode( &self, opcode: VibeOpCode, ) -> Result<(&'p dyn VibeNamespaceProvider, &'static FuncDescriptor), VibeTrap>

Resolves a (provider, FuncDescriptor) in bounded time from a VibeOpCode.

Source

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.

Source

pub fn find_sub_namespace<'a>( desc: &'a ProviderDescriptor, sub_name: &str, ) -> Option<&'a SubNamespaceDescriptor>

Iterates over all active provider descriptors.

Source

pub fn validate_unique_stable_ids( desc: &ProviderDescriptor, ) -> Result<(), VibeTrap>

Checks whether a StableFuncId is duplicated within the same provider.

Trait Implementations§

Source§

impl<'p> Default for ExtensionRegistry<'p>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'p> !RefUnwindSafe for ExtensionRegistry<'p>

§

impl<'p> !UnwindSafe for ExtensionRegistry<'p>

§

impl<'p> Freeze for ExtensionRegistry<'p>

§

impl<'p> Send for ExtensionRegistry<'p>

§

impl<'p> Sync for ExtensionRegistry<'p>

§

impl<'p> Unpin for ExtensionRegistry<'p>

§

impl<'p> UnsafeUnpin for ExtensionRegistry<'p>

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,