Skip to main content

load_from_file

Function load_from_file 

Source
pub fn load_from_file(
    config_path: &Path,
) -> Result<ServiceConfig, Box<dyn Error>>
Expand description

Loads configuration from a JSON file.

This function reads configuration from a file path.

§Arguments

  • config_path - Path to the JSON configuration file

§Returns

A ServiceConfig ready to use, or an error if the file doesn’t exist, parsing fails, or required fields are missing.