Skip to main content

atomic_write_json

Function atomic_write_json 

Source
pub fn atomic_write_json<T: Serialize>(path: &Path, value: &T) -> Result<()>
Expand description

Atomically write value as pretty-printed JSON to path.

A trailing newline is appended so the file is well-formed for line-oriented tooling and diffs.