(&self, path: P)
| 77 | } |
| 78 | |
| 79 | pub fn save_to<P: AsRef<Path>>(&self, path: P) -> anyhow::Result<()> { |
| 80 | let file = std::fs::File::create(path.as_ref().join("walltime.metadata"))?; |
| 81 | const BUFFER_SIZE: usize = 256 * 1024 /* 256 KB */; |
| 82 | |
| 83 | let writer = BufWriter::with_capacity(BUFFER_SIZE, file); |
| 84 | serde_json::to_writer(writer, self)?; |
| 85 | Ok(()) |
| 86 | } |
| 87 | } |
nothing calls this directly
no outgoing calls
no test coverage detected