Skip to main content

write_json_atomic

Function write_json_atomic 

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

Write JSON through a temporary file and rename, so a kill cannot leave a truncated state file behind.