pub trait HashFunction {
type Output;
// Required method
fn hash(data: &[u8]) -> Self::Output;
}
Expand description
哈希算法trait,为不同哈希算法提供统一接口
Required Associated Types§
Required 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.