pub fn save_to_path(&self, path: &Path) {
        Self::create_dir(path);

        let config_string = match toml::to_string(self) {
            Ok(v) => v,
            Err(e) => {
                println!("Unexpected error when deserializing config: {}", e);
                return;
            }
        };

        match fs::write(path, config_string) {
            Ok(_) => (),
            Err(e) => println!("Unable to initialize dura config file: {}", e),
        }
    }
/// Attempts to create parent dirs, serialize `self` as TOML and write to disk.
Attempts to create parent dirs, serialize `self` as TOML and write to disk.
Attempts to create parent dirs serialize ` self ` as TOML and write to disk .
pub fn save_to_path(&self, path: &Path) {
        Self::create_dir(path);
        let config_string = match toml::to_string(self) {
            Ok(v) => v,
            Err(e) => {
                println!("Unexpected error when deserializing config: {}", e);
                return;
            }
        };
        match fs::write(path, config_string) {
            Ok(_) => (),
            Err(e) => println!("Unable to initialize dura config file: {}", e),
        }
    }
pub fn save_to_path ( & self , path : & Path ) { Self :: create_dir ( path ) ; let config_string = match toml :: to_string ( self ) { Ok ( v ) => v , Err ( e ) => { println ! ( " " e ) ; return ; } } ; match fs :: write ( path , config_string ) { Ok ( _ ) => ( ) , Err ( e ) => println ! ( " " e ) , } }
Attempts to create parent dirs, serialize `self` as TOML and write to disk.
Attempts to create parent dirs serialize ` self ` as TOML and write to disk .
&self
path
&Path
&self
path
&Path