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>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
ChoosePluginError::InvalidPluginInstancefor missing registered content (checked before decoding), or aschoose_plugin_instancereports.ChoosePluginError::PluginNotFoundif no registered instance matches the vendor.