load_config

Function load_config 

Source
pub fn load_config(
    plugin_path: &PathBuf,
) -> Result<(Config, StdInfo), ConfigError>
Expand description

Loads and validates a plugin’s configuration.

This function reads the config.toml file from the specified plugin directory, parses it into a Config struct, and converts it into the standard plugin information format used by the plugin system.

§Arguments

  • plugin_path - Path to the plugin directory containing config.toml

§Errors

Returns an error if:

  • The config file is missing or unreadable
  • The config file contains invalid TOML
  • Required fields are missing or have invalid values