pub fn generate(&self, password: &str) -> Result<Pair> {
		let (pair, phrase) = Pair::generate_with_phrase(Some(password));
		let mut file = File::create(self.key_file_path(&pair.public()))?;
		::serde_json::to_writer(&file, &phrase)?;
		file.flush()?;
		Ok(pair)
	}
/// Generate a new key, placing it into the store.
Generate a new key, placing it into the store.
Generate a new key placing it into the store .
pub fn generate(&self, password: &str) -> Result<Pair> {
		let (pair, phrase) = Pair::generate_with_phrase(Some(password));
		let mut file = File::create(self.key_file_path(&pair.public()))?;
		::serde_json::to_writer(&file, &phrase)?;
		file.flush()?;
		Ok(pair)
	}
pub fn generate ( & self , password : & str ) -> Result < Pair > { let ( pair , phrase ) = Pair :: generate_with_phrase ( Some ( password ) ) ; let mut file = File :: create ( self . key_file_path ( & pair . public ( ) ) ) ? ; :: serde_json :: to_writer ( & file , & phrase ) ? ; file . flush ( ) ? ; Ok ( pair ) }
Generate a new key, placing it into the store.
Generate a new key placing it into the store .
&self
password
&str
&self
password
&str