Trait cfx_rpc_utils::error::api::AsEthApiError
source · pub trait AsEthApiError {
// Required method
fn as_err(&self) -> Option<&EthApiError>;
// Provided methods
fn is_gas_too_high(&self) -> bool { ... }
fn is_gas_too_low(&self) -> bool { ... }
}
Expand description
Helper trait to access wrapped core error.
Required Methods§
sourcefn as_err(&self) -> Option<&EthApiError>
fn as_err(&self) -> Option<&EthApiError>
Returns reference to EthApiError
, if this an error variant inherited
from core functionality.
Provided Methods§
sourcefn is_gas_too_high(&self) -> bool
fn is_gas_too_high(&self) -> bool
Returns true
if error is
[RpcInvalidTransactionError::GasTooHigh
].
sourcefn is_gas_too_low(&self) -> bool
fn is_gas_too_low(&self) -> bool
Returns true
if error is
[RpcInvalidTransactionError::GasTooLow
].