feat(host): resolve published interface references
This commit is contained in:
@@ -208,6 +208,18 @@ impl InterfaceRegistry {
|
||||
})
|
||||
}
|
||||
|
||||
/// Resolves a transport-provided opaque reference string in this registry.
|
||||
///
|
||||
/// The returned value is registry-scoped and suitable for observation or a
|
||||
/// qualified [`CallRequest`]. Unknown or foreign references return `None`;
|
||||
/// constructing arbitrary `InterfaceRef` values is intentionally not part of
|
||||
/// the public API.
|
||||
#[must_use]
|
||||
pub fn resolve(&self, reference: &str) -> Option<InterfaceRef> {
|
||||
let reference = InterfaceRef(reference.to_owned());
|
||||
self.artifacts.contains_key(&reference).then_some(reference)
|
||||
}
|
||||
|
||||
/// Observes the descriptor and optional validator for an opaque reference.
|
||||
#[must_use]
|
||||
pub fn observe(&self, reference: &InterfaceRef) -> Option<InterfaceObservation> {
|
||||
|
||||
Reference in New Issue
Block a user