openzeppelin_relayer::config

Function load_config

Source
pub fn load_config(config_file_path: &str) -> Result<Config, ConfigFileError>
Expand description

Loads and validates a configuration file from the specified path.

This function reads the configuration file, parses it as JSON, and validates its contents. If the configuration is valid, it returns a Config object.

§Arguments

  • config_file_path - A string slice that holds the path to the configuration file.

§Errors

Returns a ConfigFileError if the file cannot be read, parsed, or if the configuration is invalid.