pub trait RpcConnection:
Send
+ Sync
+ Debug
+ 'static {
Show 22 methods
// Required methods
fn new<U>(url: U, commitment_config: Option<CommitmentConfig>) -> Self
where U: ToString,
Self: Sized;
fn get_payer(&self) -> &Keypair;
fn get_url(&self) -> String;
fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_block_time<'life0, 'async_trait>(
&'life0 self,
slot: u64,
) -> Pin<Box<dyn Future<Output = Result<i64, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_epoch_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<EpochInfo, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_program_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
program_id: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Pubkey, Account)>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn process_transaction<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn process_transaction_with_context<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<(Signature, u64), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn create_and_send_transaction_with_event<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>(
&'life0 mut self,
instructions: &'life1 [Instruction],
authority: &'life2 Pubkey,
signers: &'life3 [&'life4 Keypair],
transaction_params: Option<TransactionParams>,
) -> Pin<Box<dyn Future<Output = Result<Option<(T, Signature, u64)>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
T: BorshDeserialize + Send + Debug + 'async_trait,
Self: 'async_trait;
fn confirm_transaction<'life0, 'async_trait>(
&'life0 self,
signature: Signature,
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_account<'life0, 'async_trait>(
&'life0 mut self,
address: Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn set_account(&mut self, address: &Pubkey, account: &AccountSharedData);
fn get_minimum_balance_for_rent_exemption<'life0, 'async_trait>(
&'life0 mut self,
data_len: usize,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn airdrop_lamports<'life0, 'life1, 'async_trait>(
&'life0 mut self,
to: &'life1 Pubkey,
lamports: u64,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_balance<'life0, 'life1, 'async_trait>(
&'life0 mut self,
pubkey: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_latest_blockhash<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Hash, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_slot<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn warp_to_slot<'life0, 'async_trait>(
&'life0 mut self,
slot: u64,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn send_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
transaction: &'life1 Transaction,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
// Provided methods
fn create_and_send_transaction<'a, 'async_trait>(
&'a mut self,
instructions: &'a [Instruction],
payer: &'a Pubkey,
signers: &'a [&'a Keypair],
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where 'a: 'async_trait,
Self: 'async_trait { ... }
fn get_anchor_account<'life0, 'life1, 'async_trait, T>(
&'life0 mut self,
pubkey: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait + BorshDeserialize,
Self: 'async_trait { ... }
}
Required Methods§
fn new<U>(url: U, commitment_config: Option<CommitmentConfig>) -> Self
fn get_payer(&self) -> &Keypair
fn get_url(&self) -> String
fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_time<'life0, 'async_trait>(
&'life0 self,
slot: u64,
) -> Pin<Box<dyn Future<Output = Result<i64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_epoch_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<EpochInfo, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_program_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
program_id: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Pubkey, Account)>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn process_transaction<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn process_transaction_with_context<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<(Signature, u64), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn create_and_send_transaction_with_event<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>(
&'life0 mut self,
instructions: &'life1 [Instruction],
authority: &'life2 Pubkey,
signers: &'life3 [&'life4 Keypair],
transaction_params: Option<TransactionParams>,
) -> Pin<Box<dyn Future<Output = Result<Option<(T, Signature, u64)>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
T: BorshDeserialize + Send + Debug + 'async_trait,
Self: 'async_trait,
fn confirm_transaction<'life0, 'async_trait>(
&'life0 self,
signature: Signature,
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_account<'life0, 'async_trait>(
&'life0 mut self,
address: Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn set_account(&mut self, address: &Pubkey, account: &AccountSharedData)
fn get_minimum_balance_for_rent_exemption<'life0, 'async_trait>(
&'life0 mut self,
data_len: usize,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn airdrop_lamports<'life0, 'life1, 'async_trait>(
&'life0 mut self,
to: &'life1 Pubkey,
lamports: u64,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_balance<'life0, 'life1, 'async_trait>(
&'life0 mut self,
pubkey: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_latest_blockhash<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Hash, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_slot<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn warp_to_slot<'life0, 'async_trait>(
&'life0 mut self,
slot: u64,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn send_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
transaction: &'life1 Transaction,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Provided Methods§
fn create_and_send_transaction<'a, 'async_trait>(
&'a mut self,
instructions: &'a [Instruction],
payer: &'a Pubkey,
signers: &'a [&'a Keypair],
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: 'async_trait,
fn get_anchor_account<'life0, 'life1, 'async_trait, T>(
&'life0 mut self,
pubkey: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait + BorshDeserialize,
Self: 'async_trait,
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.