pub fn write_to_interface(
        &self,
        config_dir: &Path,
        interface: &InterfaceName,
    ) -> Result<PathBuf, Error> {
        let path = Self::build_config_file_path(config_dir, interface)?;
        File::create(&path)
            .with_path(&path)?
            .write_all(toml::to_string(self).unwrap().as_bytes())?;
        Ok(path)
    }
/// Overwrites the config file if it already exists.
Overwrites the config file if it already exists.
Overwrites the config file if it already exists .
pub fn write_to_interface(
        &self,
        config_dir: &Path,
        interface: &InterfaceName,
    ) -> Result<PathBuf, Error> {
        let path = Self::build_config_file_path(config_dir, interface)?;
        File::create(&path)
            .with_path(&path)?
            .write_all(toml::to_string(self).unwrap().as_bytes())?;
        Ok(path)
    }
pub fn write_to_interface ( & self , config_dir : & Path , interface : & InterfaceName , ) -> Result < PathBuf , Error > { let path = Self :: build_config_file_path ( config_dir , interface ) ? ; File :: create ( & path ) . with_path ( & path ) ? . write_all ( toml :: to_string ( self ) . unwrap ( ) . as_bytes ( ) ) ? ; Ok ( path ) }
Overwrites the config file if it already exists.
Overwrites the config file if it already exists .
&self
config_dir
&Path
interface
&InterfaceName