Skip to main content

atomic_write_with

Function atomic_write_with 

Source
pub fn atomic_write_with(
    path: &Path,
    write: impl FnOnce(&mut File) -> Result<()>,
) -> Result<()>
Expand description

Atomically replace path using a writer callback, so streamed encoders avoid buffering the whole payload twice.