Trait subxt_core::config::Hasher

source ·
pub trait Hasher {
    type Output;

    // Required method
    fn hash(s: &[u8]) -> Self::Output;

    // Provided method
    fn hash_of<S: Encode>(s: &S) -> Self::Output { ... }
}
Expand description

This represents the hasher used by a node to hash things like block headers and extrinsics.

Required Associated Types§

source

type Output

The type given back from the hash operation

Required Methods§

source

fn hash(s: &[u8]) -> Self::Output

Hash some bytes to the given output type.

Provided Methods§

source

fn hash_of<S: Encode>(s: &S) -> Self::Output

Hash some SCALE encodable type to the given output type.

Object Safety§

This trait is not object safe.

Implementors§