pub fn register_plugin(plugin: Arc<dyn Plugin>) -> Result<()>Expand description
Registers a plugin by kind.
Registering the same kind twice returns PluginError::RegistrationFailed.
Register a plugin kind with the global plugin registry.
Registered plugins can then participate in validation and initialization of
PluginConfig documents.
§Parameters
plugin: Plugin implementation to register.
§Returns
A plugin Result that is Ok(()) when the plugin kind was added
to the registry.
§Errors
Returns an error when a plugin with the same kind is already registered or when the registry lock is poisoned.
§Notes
Registration affects future validation and initialization only.