Trait light_client::rpc::rpc_connection::RpcConnection

source ·
pub trait RpcConnection:
    Send
    + Sync
    + Debug
    + 'static {
Show 22 methods // Required methods fn new<U: ToString>( url: U, commitment_config: Option<CommitmentConfig>, ) -> Self where 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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait; fn get_epoch_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<EpochInfo, RpcError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 Self: 'async_trait, 'life0: 'async_trait; fn process_transaction_with_context<'life0, 'async_trait>( &'life0 mut self, transaction: Transaction, ) -> Pin<Box<dyn Future<Output = Result<(Signature, Slot), RpcError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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, Slot)>, RpcError>> + Send + 'async_trait>> where T: BorshDeserialize + Send + Debug + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn confirm_transaction<'life0, 'async_trait>( &'life0 self, signature: Signature, ) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_latest_blockhash<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Hash, RpcError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_slot<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn warp_to_slot<'life0, 'async_trait>( &'life0 mut self, slot: Slot, ) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 Self: 'async_trait, 'a: '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 T: 'async_trait + BorshDeserialize, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}

Required Methods§

source

fn new<U: ToString>(url: U, commitment_config: Option<CommitmentConfig>) -> Self
where Self: Sized,

source

fn get_payer(&self) -> &Keypair

source

fn get_url(&self) -> String

source

fn health<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_block_time<'life0, 'async_trait>( &'life0 self, slot: u64, ) -> Pin<Box<dyn Future<Output = Result<i64, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_epoch_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<EpochInfo, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn process_transaction<'life0, 'async_trait>( &'life0 mut self, transaction: Transaction, ) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn process_transaction_with_context<'life0, 'async_trait>( &'life0 mut self, transaction: Transaction, ) -> Pin<Box<dyn Future<Output = Result<(Signature, Slot), RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

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, Slot)>, RpcError>> + Send + 'async_trait>>
where T: BorshDeserialize + Send + Debug + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

source

fn confirm_transaction<'life0, 'async_trait>( &'life0 self, signature: Signature, ) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_account<'life0, 'async_trait>( &'life0 mut self, address: Pubkey, ) -> Pin<Box<dyn Future<Output = Result<Option<Account>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn set_account(&mut self, address: &Pubkey, account: &AccountSharedData)

source

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 Self: 'async_trait, 'life0: 'async_trait,

source

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_latest_blockhash<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Hash, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_slot<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn warp_to_slot<'life0, 'async_trait>( &'life0 mut self, slot: Slot, ) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn send_transaction<'life0, 'life1, 'async_trait>( &'life0 self, transaction: &'life1 Transaction, ) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

source

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 Self: 'async_trait, 'a: 'async_trait,

source

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 T: 'async_trait + BorshDeserialize, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§