pub trait HashableMetadata<E: ExternalMemory>: AsMetadata<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§
Sourcefn types_merkle_root(
&self,
ext_memory: &mut E,
) -> Result<[u8; 32], MetaCutError<E, Self>>
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§
Sourcefn digest_with_short_specs(
&self,
short_specs: &ShortSpecs,
ext_memory: &mut E,
) -> Result<[u8; 32], MetaCutError<E, Self>>
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.
impl<E: ExternalMemory> HashableMetadata<E> for RuntimeMetadataV15
Available on crate features
merkle-standard only.fn types_merkle_root( &self, _ext_memory: &mut E, ) -> Result<[u8; 32], MetaCutError<E, RuntimeMetadataV15>>
Implementors§
impl<E, L> HashableMetadata<E> for ShortMetadata<L, E>where
L: Leaf<LEN, E>,
E: ExternalMemory,
Available on crate features
merkle-lean only.