Skip to main content

bind_plugin_instances

Function bind_plugin_instances 

Source
pub fn bind_plugin_instances<'a, P, C>(
    hub: &ClientHub,
    documents: impl IntoIterator<Item = &'a (impl AsRef<str> + 'a, Value)>,
    client: &Arc<C>,
) -> Result<()>
where P: GtsSchema, C: ?Sized + Send + Sync + 'static,
Expand description

Bind client as the scoped C client of every instance of spec P in documents: a plugin’s init binds its client to the instances of its admitted manifest (GearCtx::gts_publication_manifest).

documents are the manifest’s (gts::GtsId, document) pairs, or any pairs with an id that is a string.

§Errors

documents holds no instance of P.