Skip to main content

NewBlockPayload

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".

Implementors§

§

impl<B> NewBlockPayload for NewBlock<B>
where B: Block + 'static,

§

type Block = B