pub fn write(destination: &Path, bytes: &[u8]) -> Result<(), AtomicWriteError>Expand description
Atomically replaces destination with bytes, durably.
The temp sibling is created with mode 0600 and a name unique per call, so concurrent writers to the same destination cannot interleave into one another’s file — they degrade to last-writer-wins with each writer’s own bytes intact.
§Errors
See AtomicWriteError: the two variants mean materially different
things and are worth matching on rather than collapsing.