Skip to main content

NewBlockPayload

Trait NewBlockPayload 

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

Source

type Block: Block

The block type.

Required Methods§

Source

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§

Source§

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

Source§

type Block = B