Function dochy::fs::filesys::save_dochy_file_nb[][src]

pub fn save_dochy_file_nb<F>(
    info: &SaveDirInfo,
    file_name: &str,
    root: &RootObject,
    overwrite: bool,
    callback: F
) where
    F: 'static + FnOnce(Result<PathBuf, FsError>) + Send
Expand description

non-blocking version. spawns 1 OS thread. Saves clone of the RootObject, and cloning is very fast because RootObject consists of Arcs. Actual copying occurs only when the RootObject is modified before the saving is finished, and only the parts to be modified are copied using Arc::make_mut.