TestRpc

Trait TestRpc 

Source
pub trait TestRpc: Rpc + Sized {
    // Required methods
    fn set_account(&mut self, address: Pubkey, account: Account);
    fn warp_to_slot(&mut self, slot: Slot) -> Result<(), RpcError>;
    fn warp_slot_forward<'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;

    // Provided method
    fn warp_epoch_forward<'life0, 'async_trait>(
        &'life0 mut self,
        epochs: u64,
    ) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

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

Source

fn warp_to_slot(&mut self, slot: Slot) -> Result<(), RpcError>

Source

fn warp_slot_forward<'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,

Warps current slot forward by slots. Claims and compresses compressible ctoken accounts.

Provided Methods§

Source

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

Warps forward by the specified number of epochs. Each epoch is SLOTS_PER_EPOCH slots.

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.

Implementations on Foreign Types§

Source§

impl TestRpc for LightClient

Source§

fn set_account(&mut self, _address: Pubkey, _account: Account)

Source§

fn warp_to_slot(&mut self, _slot: Slot) -> Result<(), RpcError>

Source§

fn warp_slot_forward<'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,

Implementors§