pub struct Rpc { /* private fields */ }Expand description
The default CommitmentConfig is Processed and the default number of connections is 2.
Implementations§
Source§impl Rpc
impl Rpc
pub async fn new(endpoint: String) -> Self
pub async fn new_with_commitment( endpoint: String, commitment: CommitmentConfig, ) -> Self
pub async fn new_with_max_connections( endpoint: String, max_connections: usize, ) -> Self
pub async fn new_with_commitment_and_max_connections( endpoint: String, commitment: CommitmentConfig, max_connections: usize, ) -> Self
pub fn endpoint(&self) -> &str
pub async fn get_account( &self, account: &Pubkey, config: Option<RpcAccountInfoConfig>, ) -> RpcResult<Response<Option<Account>>>
pub async fn get_multiple_accounts( &self, accounts: &[Pubkey], config: Option<RpcAccountInfoConfig>, ) -> RpcResult<Response<Vec<Option<Account>>>>
pub async fn get_program_accounts( &self, program_id: &Pubkey, config: Option<RpcProgramAccountsConfig>, ) -> RpcResult<Vec<(Pubkey, Account)>>
pub async fn get_slot( &self, commitment: Option<CommitmentConfig>, ) -> RpcResult<Slot>
pub async fn get_latest_blockhash(&self) -> RpcResult<Hash>
pub async fn get_signature_statuses( &self, signatures: &[Signature], search_transaction_history: bool, ) -> RpcResult<Vec<Option<TransactionStatus>>>
pub async fn simulate_transaction( &self, transaction: &VersionedTransaction, config: Option<RpcSimulateTransactionConfig>, ) -> RpcResult<RpcSimulateTransactionResult>
Auto Trait Implementations§
impl !Freeze for Rpc
impl !RefUnwindSafe for Rpc
impl Send for Rpc
impl Sync for Rpc
impl Unpin for Rpc
impl !UnwindSafe for Rpc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more