fn save(&self) {
        info!("Saving config file {}", self.path.to_string_lossy());
        let serialized = serde_json::to_string_pretty(self).expect("Can't serialize Store to JSON");
        let directory = self.path.parent().unwrap_or(Path::new("."));
        fs::create_dir_all(directory)
            .unwrap_or_else(|_| panic!("Unable to create directory for file {}", self.path.to_string_lossy()));
        fs::write(&self.path, serialized)
            .unwrap_or_else(|_| panic!("Unable to write file {}", self.path.to_string_lossy()));
    }
/// Save all informations in the store file

Save all informations in the store file
Save all informations in the store file
fn save(&self) {
        info!("Saving config file {}", self.path.to_string_lossy());
        let serialized = serde_json::to_string_pretty(self).expect("Can't serialize Store to JSON");
        let directory = self.path.parent().unwrap_or(Path::new("."));
        fs::create_dir_all(directory)
            .unwrap_or_else(|_| panic!("Unable to create directory for file {}", self.path.to_string_lossy()));
        fs::write(&self.path, serialized)
            .unwrap_or_else(|_| panic!("Unable to write file {}", self.path.to_string_lossy()));
    }
fn save ( & self ) { info ! ( " " self path to_string_lossy ( ) ) ; let serialized = serde_json :: to_string_pretty ( self ) . expect ( " " ) ; let directory = self . path . parent ( ) . unwrap_or ( Path :: new ( " " ) ) ; fs :: create_dir_all ( directory ) . unwrap_or_else ( | _ | panic ! ( " " self path to_string_lossy ( ) ) ) ; fs :: write ( & self . path , serialized ) . unwrap_or_else ( | _ | panic ! ( " " self path to_string_lossy ( ) ) ) ; }
Save all informations in the store file
Save all informations in the store file
&self
&self