pub struct MockRpc { /* private fields */ }Expand description
A mock Rpc that returns scripted raw JSON-RPC responses in FIFO order.
Each trait call consumes one response and runs it through the same parse
layer as WakiRpc, so the full response→typed path is exercised. Returns
RpcError::Unexpected once the queue is empty.
Implementations§
Trait Implementations§
Source§impl Rpc for MockRpc
impl Rpc for MockRpc
fn get_latest_blockhash(&self) -> Result<BlockhashInfo, RpcError>
fn get_account_info( &self, _pubkey: &Pubkey, ) -> Result<Option<AccountInfo>, RpcError>
fn get_signatures_for_address( &self, _pubkey: &Pubkey, _limit: usize, ) -> Result<Vec<TxSummary>, RpcError>
Auto Trait Implementations§
impl !Freeze for MockRpc
impl !RefUnwindSafe for MockRpc
impl !Sync for MockRpc
impl Send for MockRpc
impl Unpin for MockRpc
impl UnsafeUnpin for MockRpc
impl UnwindSafe for MockRpc
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