pub fn is_valid_pubkey<T>(string: T) -> Result<(), String>
where
    T: AsRef<str> + Display,
{
    match parse_signer_source(string.as_ref())
        .map_err(|err| format!("{}", err))?
        .kind
    {
        SignerSourceKind::Filepath(path) => is_keypair(path),
        _ => Ok(()),
    }
}
// Return an error if string cannot be parsed as a pubkey string, or a valid Signer that can
// produce a pubkey()
Return an error if string cannot be parsed as a pubkey string, or a valid Signer that can
produce a pubkey()
Return an error if string cannot be parsed as a pubkey string or a valid Signer that can produce a pubkey ()
pub fn is_valid_pubkey<T>(string: T) -> Result<(), String>
where
    T: AsRef<str> + Display,
{
    match parse_signer_source(string.as_ref())
        .map_err(|err| format!("{}", err))?
        .kind
    {
        SignerSourceKind::Filepath(path) => is_keypair(path),
        _ => Ok(()),
    }
}
pub fn is_valid_pubkey < T > ( string : T ) -> Result < ( ) , String > where T : AsRef < str > + Display , { match parse_signer_source ( string . as_ref ( ) ) . map_err ( | err | format ! ( " " err ) ) ? . kind { SignerSourceKind :: Filepath ( path ) => is_keypair ( path ) , _ => Ok ( ( ) ) , } }
Return an error if string cannot be parsed as a pubkey string, or a valid Signer that can
produce a pubkey()
Return an error if string cannot be parsed as a pubkey string or a valid Signer that can produce a pubkey ()
string
T