Trait RpcNodeCore
pub trait RpcNodeCore:
Clone
+ Send
+ Sync {
type Provider: Send + Sync + Clone + Unpin;
type Pool: Send + Sync + Clone + Unpin;
type Evm: Send + Sync + Clone + Unpin;
type Network: Send + Sync + Clone;
type PayloadBuilder: Send + Sync + Clone;
// Required methods
fn pool(&self) -> &Self::Pool;
fn evm_config(&self) -> &Self::Evm;
fn network(&self) -> &Self::Network;
fn payload_builder(&self) -> &Self::PayloadBuilder;
fn provider(&self) -> &Self::Provider;
}
Expand description
Helper trait to relax trait bounds on FullNodeComponents
.
Helpful when defining types that would otherwise have a generic N: FullNodeComponents
. Using
N: RpcNodeCore
instead, allows access to all the associated types on FullNodeComponents
that are used in RPC, but with more flexibility since they have no trait bounds (asides auto
traits).
Required Associated Types§
type Evm: Send + Sync + Clone + Unpin
type Evm: Send + Sync + Clone + Unpin
The node’s EVM configuration, defining settings for the Ethereum Virtual Machine.
type PayloadBuilder: Send + Sync + Clone
type PayloadBuilder: Send + Sync + Clone
Builds new blocks.
Required Methods§
fn evm_config(&self) -> &Self::Evm
fn evm_config(&self) -> &Self::Evm
Returns the node’s evm config.
fn payload_builder(&self) -> &Self::PayloadBuilder
fn payload_builder(&self) -> &Self::PayloadBuilder
Returns the handle to the payload builder service.
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.