Trait subxt_core::config::Header

source ·
pub trait Header: Sized + Encode + Decode {
    type Number: Into<u64>;
    type Hasher: Hasher;

    // Required method
    fn number(&self) -> Self::Number;

    // Provided method
    fn hash(&self) -> <Self::Hasher as Hasher>::Output { ... }
}
Expand description

This represents the block header type used by a node.

Required Associated Types§

source

type Number: Into<u64>

The block number type for this header.

source

type Hasher: Hasher

The hasher used to hash this header.

Required Methods§

source

fn number(&self) -> Self::Number

Return the block number of this header.

Provided Methods§

source

fn hash(&self) -> <Self::Hasher as Hasher>::Output

Hash this header.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<N, H> Header for SubstrateHeader<N, H>

§

type Number = N

§

type Hasher = H