Skip to main content

choose_registered_plugin_instance

Function choose_registered_plugin_instance 

Source
pub fn choose_registered_plugin_instance<'a, P, C>(
    hub: &ClientHub,
    vendor: &str,
    instances: impl IntoIterator<Item = (&'a str, Option<&'a Value>)>,
) -> Result<String, ChoosePluginError>
where P: for<'de> GtsDeserialize<'de> + GtsSchema, C: ?Sized + Send + Sync + 'static,
Expand description

choose_plugin_instance among entries with a scoped C client in hub under ClientScope::gts_id. Checks registration, not health.

Skips unregistered entries without validation, tolerating stale catalogue data. Registered entries retain listing order; the first wins a priority tie. Select after all plugins bind in init so every local candidate is visible.

Callers must pair C with the listing’s P and subsequent scoped lookup; types do not enforce this. Registered content must decode as PluginV1<P> with id == gts_id.

§Errors