pub trait Header: Serialize {
    type Id: BlockId;
    type Date: BlockDate;
    type ChainLength: ChainLength;
    type Version;

    fn id(&self) -> Self::Id;
    fn parent_id(&self) -> Self::Id;
    fn date(&self) -> Self::Date;
    fn version(&self) -> Self::Version;
    fn chain_length(&self) -> Self::ChainLength;
}
Expand description

Trait identifying the block header type.

Required Associated Types

The block header id.

The block date.

the length of the blockchain (number of blocks)

the type associated to the version of a block

Required Methods

Retrieves the block’s header id.

get the parent block identifier (the previous block in the blockchain).

Retrieves the block’s date.

access the version of a given block

get the block’s chain length. The number of block created following this thread of blocks on the blockchain (including Self).

Implementors