[][src]Function grin_store::save_via_temp_file

pub fn save_via_temp_file<F>(
    path: &str,
    temp_suffix: &str,
    writer: F
) -> Result<(), Error> where
    F: FnMut(Box<dyn Write>) -> Result<(), Error>, 

Creates temporary file with name created by adding temp_suffix to path. Applies writer function to it and renames temporary file into original specified by path.