Skip to main content

Hash

Trait Hash 

Source
pub trait Hash<const DIGEST_LEN: usize> {
    type TypedDigest: Into<Digest<DIGEST_LEN>> + Eq + Hash + Copy + Debug;

    // Required method
    fn digest(&self) -> Self::TypedDigest;
}
Expand description

This trait is implemented by all messages that can be hashed.

Required Associated Types§

Source

type TypedDigest: Into<Digest<DIGEST_LEN>> + Eq + Hash + Copy + Debug

The type of the digest when this is hashed.

Required Methods§

Source

fn digest(&self) -> Self::TypedDigest

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§