(path: &Path)
| 189 | |
| 190 | impl PciBindState { |
| 191 | pub fn load(path: &Path) -> Result<Self, std::io::Error> { |
| 192 | let data = fs::read_to_string(path)?; |
| 193 | serde_json::from_str(&data) |
| 194 | .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e)) |
| 195 | } |
| 196 | |
| 197 | pub fn save(&self, path: &Path) -> Result<(), std::io::Error> { |
| 198 | let data = serde_json::to_string_pretty(self) |
no outgoing calls