reth_eth_wire

Trait NetworkPrimitives

pub trait NetworkPrimitives:
    Send
    + Sync
    + Unpin
    + Clone
    + Debug
    + PartialEq
    + Eq
    + 'static {
    type BlockHeader: BlockHeader + Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static;
    type BlockBody: Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static;
    type Block: Block<Header = Self::BlockHeader, Body = Self::BlockBody> + Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static;
    type BroadcastedTransaction: Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static;
    type PooledTransaction: Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static;
}
Expand description

Abstraction over primitive types which might appear in network messages. See crate::EthMessage for more context.

Required Associated Types§

type BlockHeader: BlockHeader + Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static

The block header type.

type BlockBody: Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static

The block body type.

type Block: Block<Header = Self::BlockHeader, Body = Self::BlockBody> + Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static

Full block type.

type BroadcastedTransaction: Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static

The transaction type which peers announce in Transactions messages. It is different from PooledTransactions to account for Ethereum case where EIP-4844 transactions are not being announced and can only be explicitly requested from peers.

type PooledTransaction: Encodable + Decodable + Send + Sync + Unpin + Clone + Debug + PartialEq + Eq + 'static

The transaction type which peers return in PooledTransactions messages.

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§

§

impl NetworkPrimitives for EthNetworkPrimitives

§

type BlockHeader = Header

§

type BlockBody = BlockBody

§

type Block = Block

§

type BroadcastedTransaction = TransactionSigned

§

type PooledTransaction = PooledTransactionsElement