reth_eth_wire_types::primitives

Trait NetworkPrimitives

Source
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§

Source

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

The block header type.

Source

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

The block body type.

Source

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

Full block type.

Source

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.

Source

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§

Source§

impl NetworkPrimitives for EthNetworkPrimitives

Source§

type BlockHeader = Header

Source§

type BlockBody = BlockBody

Source§

type Block = Block

Source§

type BroadcastedTransaction = TransactionSigned

Source§

type PooledTransaction = PooledTransactionsElement