pub fn write_keypair<W: Write>(
    keypair: &Keypair,
    writer: &mut W,
) -> Result<String, Box<dyn error::Error>> {
    let keypair_bytes = keypair.0.to_bytes();
    let serialized = serde_json::to_string(&keypair_bytes.to_vec())?;
    writer.write_all(&serialized.clone().into_bytes())?;
    Ok(serialized)
}
/// Writes a `Keypair` to a `Write` implementor with JSON-encoding
Writes a `Keypair` to a `Write` implementor with JSON-encoding
Writes a ` Keypair ` to a ` Write ` implementor with JSON - encoding
pub fn write_keypair<W: Write>(
    keypair: &Keypair,
    writer: &mut W,
) -> Result<String, Box<dyn error::Error>> {
    let keypair_bytes = keypair.0.to_bytes();
    let serialized = serde_json::to_string(&keypair_bytes.to_vec())?;
    writer.write_all(&serialized.clone().into_bytes())?;
    Ok(serialized)
}
pub fn write_keypair < W : Write > ( keypair : & Keypair , writer : & mut W , ) -> Result < String , Box < dyn error :: Error > > { let keypair_bytes = keypair . 0 . to_bytes ( ) ; let serialized = serde_json :: to_string ( & keypair_bytes . to_vec ( ) ) ? ; writer . write_all ( & serialized . clone ( ) . into_bytes ( ) ) ? ; Ok ( serialized ) }
Writes a `Keypair` to a `Write` implementor with JSON-encoding
Writes a ` Keypair ` to a ` Write ` implementor with JSON - encoding
keypair
&Keypair
writer
&mut W