pub trait MultihashDigest<const S: usize>:
TryFrom<u64, Error = UnsupportedCode>
+ Into<u64>
+ Send
+ Sync
+ Unpin
+ Copy
+ Eq
+ Debug
+ 'static {
// Required methods
fn digest(&self, input: &[u8]) -> Multihash<S>;
fn wrap(&self, digest: &[u8]) -> Result<Multihash<S>, Error>;
}
Expand description
Trait that implements hashing.
Typically, you won’t implement this yourself but use the MultihashDigest
custom-derive.
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.