pub fn is_pubkey_sig<T>(string: T) -> Result<(), String>
where
    T: AsRef<str> + Display,
{
    let mut signer = string.as_ref().split('=');
    match Pubkey::from_str(
        signer
            .next()
            .ok_or_else(|| "Malformed signer string".to_string())?,
    ) {
        Ok(_) => {
            match Signature::from_str(
                signer
                    .next()
                    .ok_or_else(|| "Malformed signer string".to_string())?,
            ) {
                Ok(_) => Ok(()),
                Err(err) => Err(format!("{}", err)),
            }
        }
        Err(err) => Err(format!("{}", err)),
    }
}
// Return an error if string cannot be parsed as pubkey=signature string
Return an error if string cannot be parsed as pubkey=signature string
Return an error if string cannot be parsed as pubkey = signature string
pub fn is_pubkey_sig<T>(string: T) -> Result<(), String>
where
    T: AsRef<str> + Display,
{
    let mut signer = string.as_ref().split('=');
    match Pubkey::from_str(
        signer
            .next()
            .ok_or_else(|| "Malformed signer string".to_string())?,
    ) {
        Ok(_) => {
            match Signature::from_str(
                signer
                    .next()
                    .ok_or_else(|| "Malformed signer string".to_string())?,
            ) {
                Ok(_) => Ok(()),
                Err(err) => Err(format!("{}", err)),
            }
        }
        Err(err) => Err(format!("{}", err)),
    }
}
pub fn is_pubkey_sig < T > ( string : T ) -> Result < ( ) , String > where T : AsRef < str > + Display , { let mut signer = string . as_ref ( ) . split ( '=' ) ; match Pubkey :: from_str ( signer . next ( ) . ok_or_else ( | | " " . to_string ( ) ) ? , ) { Ok ( _ ) => { match Signature :: from_str ( signer . next ( ) . ok_or_else ( | | " " . to_string ( ) ) ? , ) { Ok ( _ ) => Ok ( ( ) ) , Err ( err ) => Err ( format ! ( " " err ) ) , } } Err ( err ) => Err ( format ! ( " " err ) ) , } }
Return an error if string cannot be parsed as pubkey=signature string
Return an error if string cannot be parsed as pubkey = signature string
string
T