Struct solana_program_test::BanksClient[][src]

pub struct BanksClient { /* fields omitted */ }

Implementations

impl BanksClient[src]

pub fn new<C>(
    config: Config,
    transport: C
) -> NewClient<BanksClient<Channel<BanksRequest, BanksResponse>>, RequestDispatch<BanksRequest, BanksResponse, C>> where
    C: Transport<ClientMessage<BanksRequest>, Response<BanksResponse>>, 
[src]

pub fn send_transaction_with_context(
    &mut self,
    ctx: Context,
    transaction: Transaction
) -> impl Future<Output = Result<(), Error>>
[src]

pub fn get_fees_with_commitment_and_context(
    &mut self,
    ctx: Context,
    commitment: CommitmentLevel
) -> impl Future<Output = Result<(FeeCalculator, Hash, u64), Error>>
[src]

pub fn get_transaction_status_with_context(
    &mut self,
    ctx: Context,
    signature: Signature
) -> impl Future<Output = Result<Option<TransactionStatus>, Error>>
[src]

pub fn get_slot_with_context(
    &mut self,
    ctx: Context,
    commitment: CommitmentLevel
) -> impl Future<Output = Result<u64, Error>>
[src]

pub fn process_transaction_with_commitment_and_context(
    &mut self,
    ctx: Context,
    transaction: Transaction,
    commitment: CommitmentLevel
) -> impl Future<Output = Result<Option<Result<(), TransactionError>>, Error>>
[src]

pub fn get_account_with_commitment_and_context(
    &mut self,
    ctx: Context,
    address: Pubkey,
    commitment: CommitmentLevel
) -> impl Future<Output = Result<Option<Account>, Error>>
[src]

pub fn send_transaction(
    &mut self,
    transaction: Transaction
) -> impl Future<Output = Result<(), Error>>
[src]

Send a transaction and return immediately. The server will resend the transaction until either it is accepted by the cluster or the transaction’s blockhash expires.

pub fn get_fees(
    &mut self
) -> impl Future<Output = Result<(FeeCalculator, Hash, u64), Error>>
[src]

Return the fee parameters associated with a recent, rooted blockhash. The cluster will use the transaction’s blockhash to look up these same fee parameters and use them to calculate the transaction fee.

pub fn get_rent(&mut self) -> impl Future<Output = Result<Rent, Error>>[src]

Return the cluster rent

pub fn get_recent_blockhash(
    &mut self
) -> impl Future<Output = Result<Hash, Error>>
[src]

Return a recent, rooted blockhash from the server. The cluster will only accept transactions with a blockhash that has not yet expired. Use the get_fees method to get both a blockhash and the blockhash’s last valid slot.

pub fn process_transaction_with_commitment(
    &mut self,
    transaction: Transaction,
    commitment: CommitmentLevel
) -> impl Future<Output = Result<(), TransportError>>
[src]

Send a transaction and return after the transaction has been rejected or reached the given level of commitment.

pub fn process_transaction(
    &mut self,
    transaction: Transaction
) -> impl Future<Output = Result<(), TransportError>>
[src]

Send a transaction and return until the transaction has been finalized or rejected.

pub async fn process_transactions_with_commitment(
    &'_ mut self,
    transactions: Vec<Transaction, Global>,
    commitment: CommitmentLevel
) -> Result<(), TransportError>
[src]

pub fn process_transactions(
    &mut self,
    transactions: Vec<Transaction, Global>
) -> impl Future<Output = Result<(), TransportError>>
[src]

Send transactions and return until the transaction has been finalized or rejected.

pub fn get_root_slot(&mut self) -> impl Future<Output = Result<u64, Error>>[src]

Return the most recent rooted slot height. All transactions at or below this height are said to be finalized. The cluster will not fork to a higher slot height.

pub fn get_account_with_commitment(
    &mut self,
    address: Pubkey,
    commitment: CommitmentLevel
) -> impl Future<Output = Result<Option<Account>, Error>>
[src]

Return the account at the given address at the slot corresponding to the given commitment level. If the account is not found, None is returned.

pub fn get_account(
    &mut self,
    address: Pubkey
) -> impl Future<Output = Result<Option<Account>, Error>>
[src]

Return the account at the given address at the time of the most recent root slot. If the account is not found, None is returned.

pub fn get_packed_account_data<T>(
    &mut self,
    address: Pubkey
) -> impl Future<Output = Result<T, Error>> where
    T: Pack, 
[src]

Return the unpacked account data at the given address If the account is not found, an error is returned

pub fn get_account_data_with_borsh<T>(
    &mut self,
    address: Pubkey
) -> impl Future<Output = Result<T, Error>> where
    T: BorshDeserialize, 
[src]

Return the unpacked account data at the given address If the account is not found, an error is returned

pub fn get_balance_with_commitment(
    &mut self,
    address: Pubkey,
    commitment: CommitmentLevel
) -> impl Future<Output = Result<u64, Error>>
[src]

Return the balance in lamports of an account at the given address at the slot corresponding to the given commitment level.

pub fn get_balance(
    &mut self,
    address: Pubkey
) -> impl Future<Output = Result<u64, Error>>
[src]

Return the balance in lamports of an account at the given address at the time of the most recent root slot.

pub fn get_transaction_status(
    &mut self,
    signature: Signature
) -> impl Future<Output = Result<Option<TransactionStatus>, Error>>
[src]

Return the status of a transaction with a signature matching the transaction’s first signature. Return None if the transaction is not found, which may be because the blockhash was expired or the fee-paying account had insufficient funds to pay the transaction fee. Note that servers rarely store the full transaction history. This method may return None if the transaction status has been discarded.

pub async fn get_transaction_statuses(
    &'_ mut self,
    signatures: Vec<Signature, Global>
) -> Result<Vec<Option<TransactionStatus>, Global>, Error>
[src]

Same as get_transaction_status, but for multiple transactions.

Trait Implementations

impl Clone for BanksClient[src]

pub fn clone(&self) -> BanksClient[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl ProgramTestBanksClientExt for BanksClient[src]

fn get_new_blockhash<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    blockhash: &'life1 Hash
) -> Pin<Box<dyn Future<Output = Result<(Hash, FeeCalculator)>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Get a new blockhash, similar in spirit to RpcClient::get_new_blockhash()

This probably should eventually be moved into BanksClient proper in some form

Auto Trait Implementations

Blanket Implementations

impl<T> AbiExample for T

pub default fn example() -> T

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V