(&self, path: PathBuf)
| 216 | } |
| 217 | |
| 218 | pub fn save_profile(&self, path: PathBuf) -> Result<(), Box<dyn Error>> { |
| 219 | // save the current state of the features to a profile |
| 220 | |
| 221 | let json = serde_json::to_string_pretty(&self)?; |
| 222 | std::fs::write(&path, json)?; |
| 223 | info!("Saved Profile to {:?}", path); |
| 224 | |
| 225 | Ok(()) |
| 226 | } |
| 227 | |
| 228 | pub fn apply_profile(&self, path: PathBuf) -> Result<(), Box<dyn Error>> { |
| 229 | // apply a profile to the features |