pub fn save_to_file(&self, file_name: &str) -> Result<()> {
    let mut file = File::open(file_name)?;
    let cfg_toml = toml::to_string(self)?;
    file.write_all(cfg_toml.as_bytes())?;
    file.flush()?;
    Ok(())
  }
/// Save partial config to a file
Save partial config to a file
Save partial config to a file
pub fn save_to_file(&self, file_name: &str) -> Result<()> {
    let mut file = File::open(file_name)?;
    let cfg_toml = toml::to_string(self)?;
    file.write_all(cfg_toml.as_bytes())?;
    file.flush()?;
    Ok(())
  }
pub fn save_to_file ( & self , file_name : & str ) -> Result < ( ) > { let mut file = File :: open ( file_name ) ? ; let cfg_toml = toml :: to_string ( self ) ? ; file . write_all ( cfg_toml . as_bytes ( ) ) ? ; file . flush ( ) ? ; Ok ( ( ) ) }
Save partial config to a file
Save partial config to a file
&self
file_name
&str
&self
file_name
&str