pub trait EthApiTypes:
Send
+ Sync
+ Clone {
type Error: Into<ErrorObject<'static>> + FromEthApiError + AsEthApiError + From<<Self::RpcConvert as RpcConvert>::Error> + Error + Send + Sync;
type NetworkTypes: RpcTypes;
type RpcConvert: RpcConvert<Network = Self::NetworkTypes>;
// Required method
fn converter(&self) -> &Self::RpcConvert;
}Expand description
Network specific eth API types.
This trait defines the network specific rpc types and helpers required for the eth_ and
adjacent endpoints. NetworkTypes is [alloy_network::Network] as defined by the alloy crate,
see also [alloy_network::Ethereum].
This type is stateful so that it can provide additional context if necessary, e.g. populating receipts with additional data.
Required Associated Types§
Sourcetype Error: Into<ErrorObject<'static>> + FromEthApiError + AsEthApiError + From<<Self::RpcConvert as RpcConvert>::Error> + Error + Send + Sync
type Error: Into<ErrorObject<'static>> + FromEthApiError + AsEthApiError + From<<Self::RpcConvert as RpcConvert>::Error> + Error + Send + Sync
Extension of FromEthApiError, with network specific errors.
Sourcetype NetworkTypes: RpcTypes
type NetworkTypes: RpcTypes
Blockchain primitive types, specific to network, e.g. block and transaction.
Sourcetype RpcConvert: RpcConvert<Network = Self::NetworkTypes>
type RpcConvert: RpcConvert<Network = Self::NetworkTypes>
Conversion methods for transaction RPC type.
Required Methods§
Sourcefn converter(&self) -> &Self::RpcConvert
fn converter(&self) -> &Self::RpcConvert
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.