sp_domain_digests

Trait 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.

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.

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§