pub fn replace_atomic(src: &Path, dst: &Path) -> Result<()>
Move src to dst. If dst exists, it will be silently overwritten.
src
dst
Both paths must reside on the same filesystem for the operation to be atomic.