Function save_config
Source pub fn save_config(config: &Config) -> Result<(), Box<dyn Error>>
Expand description
Saves the configuration to a JSON file.
This function serializes the Config struct to JSON and saves it to /etc/server_setup_config.json.
§Arguments
config - A reference to the Config struct to be saved
§Returns
Returns Ok(()) if the config is saved successfully, or an error if saving fails.