Trait EthApiTypes
pub trait EthApiTypes:
Send
+ Sync
+ Clone {
type Error: Into<ErrorObject<'static>> + FromEthApiError + AsEthApiError + Error + Send + Sync;
type NetworkTypes: RpcTypes;
type TransactionCompat: Send + Sync + Clone + Debug;
// Required method
fn tx_resp_builder(&self) -> &Self::TransactionCompat;
}
Available on crate feature
rpc
only.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 [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§
type Error: Into<ErrorObject<'static>> + FromEthApiError + AsEthApiError + Error + Send + Sync
type Error: Into<ErrorObject<'static>> + FromEthApiError + AsEthApiError + Error + Send + Sync
Extension of FromEthApiError
, with network specific errors.
type NetworkTypes: RpcTypes
type NetworkTypes: RpcTypes
Blockchain primitive types, specific to network, e.g. block and transaction.
type TransactionCompat: Send + Sync + Clone + Debug
type TransactionCompat: Send + Sync + Clone + Debug
Conversion methods for transaction RPC type.
Required Methods§
fn tx_resp_builder(&self) -> &Self::TransactionCompat
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.