Skip to main content

InvalidTxError

Trait InvalidTxError 

pub trait InvalidTxError:
    Error
    + Send
    + Sync
    + Any
    + 'static {
    // Required method
    fn as_any(&self) -> &(dyn Any + 'static);

    // Provided methods
    fn is_nonce_too_low(&self) -> bool { ... }
    fn is_gas_limit_too_high(&self) -> bool { ... }
    fn is_gas_limit_too_low(&self) -> bool { ... }
}
Expand description

Abstraction over transaction validation errors.

Required Methods§

fn as_any(&self) -> &(dyn Any + 'static)

Returns the error as Any for consumers that need engine-specific downcasts.

Provided Methods§

fn is_nonce_too_low(&self) -> bool

Returns whether the transaction nonce is lower than expected.

fn is_gas_limit_too_high(&self) -> bool

Returns whether the transaction gas limit is higher than allowed.

fn is_gas_limit_too_low(&self) -> bool

Returns whether the transaction gas limit is lower than required.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§