(&self)
| 389 | } |
| 390 | |
| 391 | fn save(&self) -> Result<()> { |
| 392 | let content = serde_json::to_string(self).context("Failed to serialize gateway cache")?; |
| 393 | safe_write(GATEWAY_CACHE_PATH, &content).context("Failed to write gateway cache")?; |
| 394 | Ok(()) |
| 395 | } |
| 396 | |
| 397 | fn is_cert_valid(&self) -> bool { |
| 398 | let now = std::time::SystemTime::now() |