pub fn is_keypair<T>(string: T) -> Result<(), String>
where
    T: AsRef<str> + Display,
{
    read_keypair_file(string.as_ref())
        .map(|_| ())
        .map_err(|err| format!("{}", err))
}
// Return an error if a keypair file cannot be parsed.
Return an error if a keypair file cannot be parsed.
Return an error if a keypair file cannot be parsed .
pub fn is_keypair<T>(string: T) -> Result<(), String>
where
    T: AsRef<str> + Display,
{
    read_keypair_file(string.as_ref())
        .map(|_| ())
        .map_err(|err| format!("{}", err))
}
pub fn is_keypair < T > ( string : T ) -> Result < ( ) , String > where T : AsRef < str > + Display , { read_keypair_file ( string . as_ref ( ) ) . map ( | _ | ( ) ) . map_err ( | err | format ! ( " " err ) ) }
Return an error if a keypair file cannot be parsed.
Return an error if a keypair file cannot be parsed .
string
T