Trait Hasher

Source
pub trait Hasher {
    // Required methods
    fn write_bytes(&mut self, h: &[u8]);
    fn finish(self) -> H256;

    // Provided method
    fn hash_op() -> HashOp { ... }
}
Expand description

Trait for customize hash function

Required Methods§

Source

fn write_bytes(&mut self, h: &[u8])

Source

fn finish(self) -> H256

Provided Methods§

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.

Implementors§