Enum ethers_providers::MockError
source · pub enum MockError {
SerdeJson(Error),
EmptyRequests,
EmptyResponses,
}Expand description
Errors for the MockProvider
Variants§
SerdeJson(Error)
(De)Serialization error
EmptyRequests
Empty requests array
EmptyResponses
Empty responses array
Trait Implementations§
source§impl Error for MockError
impl Error for MockError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<MockError> for ProviderError
impl From<MockError> for ProviderError
source§impl RpcError for MockError
impl RpcError for MockError
source§fn as_error_response(&self) -> Option<&JsonRpcError>
fn as_error_response(&self) -> Option<&JsonRpcError>
Access an underlying JSON-RPC error (if any) Read more
source§fn as_serde_error(&self) -> Option<&Error>
fn as_serde_error(&self) -> Option<&Error>
Access an underlying
serde_json error (if any) Read moresource§fn is_error_response(&self) -> bool
fn is_error_response(&self) -> bool
Returns
true if the underlying error is a JSON-RPC error responsesource§fn is_serde_error(&self) -> bool
fn is_serde_error(&self) -> bool
Returns
true if the underlying error is a serde_json (de)serialization
error. This method can be used to identify