Trait BlockHeaderKey

Source
pub trait BlockHeaderKey {
    type Value: BinaryValue;

    const NAME: &'static str;
}
Expand description

Trait that represents a key in block header entry map. Provides a mapping between NAME of the entry and its value.

§Examples

See Block::get_entry().

Required Associated Constants§

Source

const NAME: &'static str

Key name.

Required Associated Types§

Source

type Value: BinaryValue

Type of the value associated with this key.

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§

Source§

impl BlockHeaderKey for Epoch

Source§

const NAME: &'static str = "epoch"

Source§

type Value = Height

Source§

impl BlockHeaderKey for ProposerId

Source§

const NAME: &'static str = "proposer_id"

Source§

type Value = ValidatorId

Source§

impl BlockHeaderKey for SkipFlag

Source§

const NAME: &'static str = "skip"

Source§

type Value = ()