fn write(&self, data_file_path: &str) -> Result<(), Error> {
		let mut data_file = File::create(data_file_path).map_err(|e| {
			Error::WalletData(format!("Could not create {}: {}", data_file_path, e))
		})?;
		let res_json = serde_json::to_vec_pretty(self).map_err(|e| {
			Error::WalletData(format!("Error serializing wallet data: {}", e))
		})?;
		data_file.write_all(res_json.as_slice()).map_err(|e| {
			Error::WalletData(format!("Error writing {}: {}", data_file_path, e))
		})
	}
/// Write the wallet data to disk.
Write the wallet data to disk.
Write the wallet data to disk .
fn write(&self, data_file_path: &str) -> Result<(), Error> {
		let mut data_file = File::create(data_file_path).map_err(|e| {
			Error::WalletData(format!("Could not create {}: {}", data_file_path, e))
		})?;
		let res_json = serde_json::to_vec_pretty(self).map_err(|e| {
			Error::WalletData(format!("Error serializing wallet data: {}", e))
		})?;
		data_file.write_all(res_json.as_slice()).map_err(|e| {
			Error::WalletData(format!("Error writing {}: {}", data_file_path, e))
		})
	}
fn write ( & self , data_file_path : & str ) -> Result < ( ) , Error > { let mut data_file = File :: create ( data_file_path ) . map_err ( | e | { Error :: WalletData ( format ! ( " " data_file_path e ) ) } ) ? ; let res_json = serde_json :: to_vec_pretty ( self ) . map_err ( | e | { Error :: WalletData ( format ! ( " " e ) ) } ) ? ; data_file . write_all ( res_json . as_slice ( ) ) . map_err ( | e | { Error :: WalletData ( format ! ( " " data_file_path e ) ) } ) }
Write the wallet data to disk.
Write the wallet data to disk .
&self
data_file_path
&str