pub struct InterfaceRegistry { /* private fields */ }Expand description
Registry of frozen definition artifacts and explicitly scoped registrations.
Artifact retention is not proof of current publication. Fetch requires a live provider-attested ScopeObservation; execution requires the same lifetime in the target’s atomic boundary. Collision keys are exact (scope, name) pairs, not Rust TypeId: the same Definition can be registered at multiple coordinates.
Implementations§
Source§impl InterfaceRegistry
impl InterfaceRegistry
Sourcepub fn register<D>(
&mut self,
scope: &Scope,
name: impl Into<String>,
_definition: D,
validator: Option<Validator>,
) -> Result<RegisteredInterface<D>, RegistrationError>where
D: InterfaceDefinition + 'static,
pub fn register<D>(
&mut self,
scope: &Scope,
name: impl Into<String>,
_definition: D,
validator: Option<Validator>,
) -> Result<RegisteredInterface<D>, RegistrationError>where
D: InterfaceDefinition + 'static,
Freezes a Definition at an explicit scope and local name.
Sourcepub fn remove_scope(&mut self, scope: &Scope)
pub fn remove_scope(&mut self, scope: &Scope)
Ends a scope lifetime and releases its registry entries.
Retained tokens cannot start new calls/fetches. Started calls retain their frozen Descriptor. Re-publication requires a fresh Scope.
Sourcepub fn resolve(&self, reference: &InterfaceReference) -> Option<InterfaceRef>
pub fn resolve(&self, reference: &InterfaceReference) -> Option<InterfaceRef>
Resolves a stored artifact, not evidence of current publication.
Sourcepub fn scopes(&self) -> impl Iterator<Item = &Scope>
pub fn scopes(&self) -> impl Iterator<Item = &Scope>
Iterates registered scope handles, possibly repeated for multiple names.
Sourcepub fn fetch_interface(
&self,
reference: &InterfaceReference,
current: &ScopeObservation,
) -> Result<InterfaceObservation, ProtocolError>
pub fn fetch_interface( &self, reference: &InterfaceReference, current: &ScopeObservation, ) -> Result<InterfaceObservation, ProtocolError>
Fetches only with a coherent current scope Object attestation.