pub fn atomic_write_with( path: &Path, write: impl FnOnce(&mut File) -> Result<()>, ) -> Result<()>
Atomically replace path using a writer callback, so streamed encoders avoid buffering the whole payload twice.
path