Trait NewBlockPayload

pub trait NewBlockPayload:
    Encodable
    + Decodable
    + Clone
    + Eq
    + Debug
    + Send
    + Sync
    + Unpin
    + 'static {
    type Block: Block;

    // Required method
    fn block(&self) -> &Self::Block;
}
Expand description

A trait for block payloads transmitted through p2p.

Required Associated Types§

type Block: Block

The block type.

Required Methods§

fn block(&self) -> &Self::Block

Returns a reference to the block.

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<B> NewBlockPayload for NewBlock<B>
where B: Block + 'static,

§

type Block = B