reth_primitives_traits/block/header.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
//! Block header data primitive.
use core::fmt;
use alloy_primitives::Sealable;
use reth_codecs::Compact;
use crate::InMemorySize;
/// Helper trait that unifies all behaviour required by block header to support full node
/// operations.
pub trait FullBlockHeader: BlockHeader + Compact {}
impl<T> FullBlockHeader for T where T: BlockHeader + Compact {}
/// Abstraction of a block header.
pub trait BlockHeader:
Send
+ Sync
+ Unpin
+ Clone
+ Default
+ fmt::Debug
+ PartialEq
+ Eq
+ alloy_rlp::Encodable
+ alloy_rlp::Decodable
+ alloy_consensus::BlockHeader
+ Sealable
+ InMemorySize
{
}
impl<T> BlockHeader for T where
T: Send
+ Sync
+ Unpin
+ Clone
+ Default
+ fmt::Debug
+ PartialEq
+ Eq
+ serde::Serialize
+ for<'de> serde::Deserialize<'de>
+ alloy_rlp::Encodable
+ alloy_rlp::Decodable
+ alloy_consensus::BlockHeader
+ Sealable
+ InMemorySize
{
}