Skip to main content

Block

Trait Block 

Source
pub trait Block:
    Heightable
    + Codec
    + Digestible
    + Send
    + Sync
    + 'static {
    // Required method
    fn parent(&self) -> Self::Digest;
}
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 parent(&self) -> Self::Digest

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

Implementors§

Source§

impl<B: Block, C: Scheme, H: Hasher> Block for StoredCodedBlock<B, C, H>

Source§

impl<B: CertifiableBlock, C: Scheme, H: Hasher> Block for CodedBlock<B, C, H>