Trait sp_runtime::traits::Hash
source · pub trait Hash: 'static + MaybeSerializeDeserialize + Debug + Clone + Eq + PartialEq + Hasher<Out = Self::Output> {
type Output: Member + MaybeSerializeDeserialize + Debug + Hash + AsRef<[u8]> + AsMut<[u8]> + Copy + Default + Encode + Decode + MaxEncodedLen + TypeInfo;
// Required methods
fn ordered_trie_root(
input: Vec<Vec<u8>>,
state_version: StateVersion
) -> Self::Output;
fn trie_root(
input: Vec<(Vec<u8>, Vec<u8>)>,
state_version: StateVersion
) -> Self::Output;
// Provided methods
fn hash(s: &[u8]) -> Self::Output { ... }
fn hash_of<S: Encode>(s: &S) -> Self::Output { ... }
}
Expand description
Abstraction around hashing
Required Associated Types§
Required Methods§
sourcefn ordered_trie_root(
input: Vec<Vec<u8>>,
state_version: StateVersion
) -> Self::Output
fn ordered_trie_root( input: Vec<Vec<u8>>, state_version: StateVersion ) -> Self::Output
The ordered Patricia tree root of the given input
.