Skip to main content

initialize_plugins

Function initialize_plugins 

Source
pub async fn initialize_plugins(config: PluginConfig) -> Result<ConfigReport>
Expand description

Configures the active global plugin components.

Initialization validates the supplied config, replaces the active configuration, and rolls back partial registration on failure. If a previous configuration was active, the host attempts to restore it when the new activation fails.

§Parameters

  • config: Plugin configuration to validate and activate.

§Returns

A plugin Result containing the successful ConfigReport.

§Errors

Returns an error when validation fails, when plugin registration fails, or when the previous configuration cannot be restored after a failed replace.

§Notes

Initialization is replace-with-rollback: the previous active configuration is removed before the new configuration is activated.