pub fn atomic_write_json<T: Serialize>(path: &Path, value: &T) -> Result<()>Expand description
Serialize value as pretty JSON and write it to path atomically.
Errors propagate as std::io::Error (serialization errors are
wrapped via Error::other). Use ? to surface them; the caller
decides whether to log / retry / abort.