pub fn account<T: AccountDeserialize>(&self, address: Pubkey) -> Result<T, ClientError> {
        let rpc_client = RpcClient::new_with_commitment(
            self.cfg.cluster.url().to_string(),
            self.cfg.options.unwrap_or_default(),
        );
        let account = rpc_client
            .get_account_with_commitment(&address, CommitmentConfig::processed())?
            .value
            .ok_or(ClientError::AccountNotFound)?;
        let mut data: &[u8] = &account.data;
        T::try_deserialize(&mut data).map_err(Into::into)
    }
/// Returns the account at the given address.
Returns the account at the given address.
Returns the account at the given address .
pub fn account<T: AccountDeserialize>(&self, address: Pubkey) -> Result<T, ClientError> {
        let rpc_client = RpcClient::new_with_commitment(
            self.cfg.cluster.url().to_string(),
            self.cfg.options.unwrap_or_default(),
        );
        let account = rpc_client
            .get_account_with_commitment(&address, CommitmentConfig::processed())?
            .value
            .ok_or(ClientError::AccountNotFound)?;
        let mut data: &[u8] = &account.data;
        T::try_deserialize(&mut data).map_err(Into::into)
    }
pub fn account < T : AccountDeserialize > ( & self , address : Pubkey ) -> Result < T , ClientError > { let rpc_client = RpcClient :: new_with_commitment ( self . cfg . cluster . url ( ) . to_string ( ) , self . cfg . options . unwrap_or_default ( ) , ) ; let account = rpc_client . get_account_with_commitment ( & address , CommitmentConfig :: processed ( ) ) ? . value . ok_or ( ClientError :: AccountNotFound ) ? ; let mut data : & [ u8 ] = & account . data ; T :: try_deserialize ( & mut data ) . map_err ( Into :: into ) }
Returns the account at the given address.
Returns the account at the given address .
&self
address
Pubkey
&self
address
Pubkey