pub trait AsyncClient {
// Required method
fn async_send_versioned_transaction(
&self,
transaction: VersionedTransaction,
) -> Result<Signature, TransportError>;
// Provided methods
fn async_send_transaction(
&self,
transaction: Transaction,
) -> Result<Signature, TransportError> { ... }
fn async_send_batch(
&self,
transactions: Vec<Transaction>,
) -> Result<(), TransportError> { ... }
fn async_send_versioned_transaction_batch(
&self,
transactions: Vec<VersionedTransaction>,
) -> Result<(), TransportError> { ... }
fn async_send_message<T>(
&self,
keypairs: &T,
message: Message,
recent_blockhash: Hash,
) -> Result<Signature, TransportError>
where T: Signers + ?Sized { ... }
fn async_send_instruction(
&self,
keypair: &Keypair,
instruction: Instruction,
recent_blockhash: Hash,
) -> Result<Signature, TransportError> { ... }
fn async_transfer(
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey,
recent_blockhash: Hash,
) -> Result<Signature, TransportError> { ... }
}Required Methods§
Sourcefn async_send_versioned_transaction(
&self,
transaction: VersionedTransaction,
) -> Result<Signature, TransportError>
fn async_send_versioned_transaction( &self, transaction: VersionedTransaction, ) -> Result<Signature, TransportError>
Send a signed versioned transaction, but don’t wait to see if the server accepted it.
Provided Methods§
Sourcefn async_send_transaction(
&self,
transaction: Transaction,
) -> Result<Signature, TransportError>
fn async_send_transaction( &self, transaction: Transaction, ) -> Result<Signature, TransportError>
Send a signed transaction, but don’t wait to see if the server accepted it.
Sourcefn async_send_batch(
&self,
transactions: Vec<Transaction>,
) -> Result<(), TransportError>
fn async_send_batch( &self, transactions: Vec<Transaction>, ) -> Result<(), TransportError>
Send a batch of signed transactions without confirmation.
Sourcefn async_send_versioned_transaction_batch(
&self,
transactions: Vec<VersionedTransaction>,
) -> Result<(), TransportError>
fn async_send_versioned_transaction_batch( &self, transactions: Vec<VersionedTransaction>, ) -> Result<(), TransportError>
Send a batch of signed versioned transactions without confirmation.
Sourcefn async_send_message<T>(
&self,
keypairs: &T,
message: Message,
recent_blockhash: Hash,
) -> Result<Signature, TransportError>
fn async_send_message<T>( &self, keypairs: &T, message: Message, recent_blockhash: Hash, ) -> Result<Signature, TransportError>
Create a transaction from the given message, and send it to the server, but don’t wait for to see if the server accepted it.
Sourcefn async_send_instruction(
&self,
keypair: &Keypair,
instruction: Instruction,
recent_blockhash: Hash,
) -> Result<Signature, TransportError>
fn async_send_instruction( &self, keypair: &Keypair, instruction: Instruction, recent_blockhash: Hash, ) -> Result<Signature, TransportError>
Create a transaction from a single instruction that only requires a single signer. Then send it to the server, but don’t wait for a reply.
Sourcefn async_transfer(
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey,
recent_blockhash: Hash,
) -> Result<Signature, TransportError>
fn async_transfer( &self, lamports: u64, keypair: &Keypair, pubkey: &Pubkey, recent_blockhash: Hash, ) -> Result<Signature, TransportError>
Attempt to transfer lamports from keypair to pubkey, but don’t wait to confirm.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.