pub trait CryptoDigest: Serialize {
const PREFIX: &'static [u8; 15];
// Provided method
fn digest(&self) -> [u8; 32] { ... }
}
Expand description
This trait can be implemented on any type that implements serde::Serialize,
in order to provide a digest()
function that returns a unique hash.
Required Associated Constants§
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.