Trait subxt::config::Header

source ·
pub trait Header: Sized + Encode {
    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.

Implementors§

source§

impl<N, H> Header for SubstrateHeader<N, H>where N: Copy + Into<u64> + Into<U256> + TryFrom<U256> + Encode, H: Hasher + Encode, SubstrateHeader<N, H>: Encode,

§

type Number = N

§

type Hasher = H