Block

Trait Block 

Source
pub trait Block:
    Codec
    + Digestible
    + Committable
    + Send
    + Sync
    + 'static {
    // Required methods
    fn height(&self) -> u64;
    fn parent(&self) -> Self::Commitment;
}
Expand description

Block is the interface for a block in the blockchain.

Blocks are used to track the progress of the consensus engine.

Required Methods§

Source

fn height(&self) -> u64

Get the height of the block.

Source

fn parent(&self) -> Self::Commitment

Get the parent block’s digest.

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§