Skip to main content

HashableMetadata

Trait HashableMetadata 

Source
pub trait HashableMetadata<E: ExternalMemory>: AsMetadata<E>
where <Self as AsMetadata<E>>::TypeRegistry: HashableRegistry<E>,
{ // Required method fn types_merkle_root( &self, ext_memory: &mut E, ) -> Result<[u8; 32], MetaCutError<E, Self>>; // Provided method fn digest_with_short_specs( &self, short_specs: &ShortSpecs, ext_memory: &mut E, ) -> Result<[u8; 32], MetaCutError<E, Self>> { ... } }
Expand description

AsMetadata with registry implementing HashableRegistry.

Required Methods§

Source

fn types_merkle_root( &self, ext_memory: &mut E, ) -> Result<[u8; 32], MetaCutError<E, Self>>

Calculate Merkle tree root hash for original complete types data.

This root hash must be identical both for shortened and full metadata. Note that for any shortened metadata in addition to known types data, serialized Merkle proof data would be required.

Provided Methods§

Source

fn digest_with_short_specs( &self, short_specs: &ShortSpecs, ext_memory: &mut E, ) -> Result<[u8; 32], MetaCutError<E, Self>>

Calculate full digest with additionally provided chain ShortSpecs.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<E: ExternalMemory> HashableMetadata<E> for RuntimeMetadataV15

Available on crate features merkle-standard only.

Implementors§

Source§

impl<E, L> HashableMetadata<E> for ShortMetadata<L, E>
where L: Leaf<LEN, E>, E: ExternalMemory,

Available on crate features merkle-lean only.