Trait sp_domain_digests::AsPredigest

source ·
pub trait AsPredigest {
    // Required methods
    fn as_consensus_block_info<Hash: Decode>(&self) -> Option<Hash>;
    fn consensus_block_info<Hash: Encode>(consensus_block_hash: Hash) -> Self;
}
Expand description

Trait to provide simpler abstractions to create predigests for runtime.

Required Methods§

source

fn as_consensus_block_info<Hash: Decode>(&self) -> Option<Hash>

Return consensus_block_hash

source

fn consensus_block_info<Hash: Encode>(consensus_block_hash: Hash) -> Self

Creates a new digest of the consensus block that derive the domain block.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AsPredigest for DigestItem

source§

fn as_consensus_block_info<Hash: Decode>(&self) -> Option<Hash>

source§

fn consensus_block_info<Hash: Encode>(consensus_block_hash: Hash) -> Self

Implementors§