reth::builder

Trait Block

pub trait Block:
    Send
    + Sync
    + Unpin
    + Clone
    + Default
    + Debug
    + PartialEq
    + Eq
    + Serialize
    + for<'a> Deserialize<'a>
    + InMemorySize {
    type Header: BlockHeader;
    type Body: Send + Sync + Unpin + 'static;

    // Required methods
    fn header(&self) -> &Self::Header;
    fn body(&self) -> &Self::Body;
}
Expand description

Abstraction of block data type.

Required Associated Types§

type Header: BlockHeader

Header part of the block.

type Body: Send + Sync + Unpin + 'static

The block’s body contains the transactions in the block.

Required Methods§

fn header(&self) -> &Self::Header

Returns reference to block header.

fn body(&self) -> &Self::Body

Returns reference to block body.

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 Block for Block

§

type Header = Header

§

type Body = BlockBody