Struct ethers_providers::MockProvider
source · pub struct MockProvider { /* private fields */ }Expand description
Mock transport used in test environments.
Implementations§
Trait Implementations§
source§impl Clone for MockProvider
impl Clone for MockProvider
source§fn clone(&self) -> MockProvider
fn clone(&self) -> MockProvider
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for MockProvider
impl Debug for MockProvider
source§impl Default for MockProvider
impl Default for MockProvider
source§impl JsonRpcClient for MockProvider
impl JsonRpcClient for MockProvider
source§fn request<'life0, 'life1, 'async_trait, T, R>(
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, MockError>> + Send + 'async_trait>>where
T: 'async_trait + Serialize + Send + Sync,
R: 'async_trait + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn request<'life0, 'life1, 'async_trait, T, R>( &'life0 self, method: &'life1 str, params: T ) -> Pin<Box<dyn Future<Output = Result<R, MockError>> + Send + 'async_trait>>where T: 'async_trait + Serialize + Send + Sync, R: 'async_trait + DeserializeOwned, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Pushes the (method, params) to the back of the requests queue,
pops the responses from the back of the responses queue