pub trait CanonicalSerializeHashExt: CanonicalSerialize {
// Provided methods
fn hash<H: Digest>(
&self,
) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize> { ... }
fn hash_uncompressed<H: Digest>(
&self,
) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize> { ... }
}
Expand description
The CanonicalSerialize induces a natural way to hash the corresponding value, of which this is the convenience trait.
Provided Methods§
fn hash<H: Digest>(&self) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>
fn hash_uncompressed<H: Digest>( &self, ) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>
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§
impl<T: CanonicalSerialize> CanonicalSerializeHashExt for T
CanonicalSerializeHashExt is a (blanket) extension trait of CanonicalSerialize