reth::rpc::api::servers::eth

Trait EthApiTypes

pub trait EthApiTypes:
    Send
    + Sync
    + Clone {
    type Error: Into<ErrorObject<'static>> + FromEthApiError + AsEthApiError + FromEvmError + Error + Send + Sync;
    type NetworkTypes: Network<HeaderResponse = Header>;
    type TransactionCompat: Send + Sync + Clone + Debug;

    // Required method
    fn tx_resp_builder(&self) -> &Self::TransactionCompat;
}
Expand description

Network specific eth API types.

Required Associated Types§

type Error: Into<ErrorObject<'static>> + FromEthApiError + AsEthApiError + FromEvmError + Error + Send + Sync

Extension of FromEthApiError, with network specific errors.

type NetworkTypes: Network<HeaderResponse = Header>

Blockchain primitive types, specific to network, e.g. block and transaction.

type TransactionCompat: Send + Sync + Clone + Debug

Conversion methods for transaction RPC type.

Required Methods§

fn tx_resp_builder(&self) -> &Self::TransactionCompat

Returns reference to transaction response builder.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Provider, Pool, Network, EvmConfig> EthApiTypes for EthApi<Provider, Pool, Network, EvmConfig>
where EthApi<Provider, Pool, Network, EvmConfig>: Send + Sync,