()
| 187 | } |
| 188 | |
| 189 | pub fn load_config() -> Result<Config, WaCustomError> { |
| 190 | let config_path = get_config_path(); |
| 191 | |
| 192 | let config_contents = std::fs::read_to_string(&config_path) |
| 193 | .map_err(|e| WaCustomError::ConfigError(format!("Failed to read config file: {}", e)))?; |
| 194 | |
| 195 | toml::from_str(&config_contents) |
| 196 | .map_err(|e| WaCustomError::ConfigError(format!("Invalid config format: {}", e))) |
| 197 | } |
| 198 | |
| 199 | #[derive(Debug, Deserialize, Clone)] |
| 200 | pub struct CacheConfig { |