pub fn write(path: &Path, rec: &Record) -> Result<(), String>
Writes the record in one step, so a reader never sees half of it.