pub trait Digest:
Eq
+ PartialEq
+ Display
+ Debug
+ Sized
+ Digest {
type Bytes;
const DIGEST_LEN: usize;
// Required methods
fn from_bytes(bytes: Self::Bytes) -> Self;
fn bytes(&self) -> Self::Bytes;
}
Expand description
The output of a Hash
.
Required Associated Constants§
Sourceconst DIGEST_LEN: usize
const DIGEST_LEN: usize
The length in bytes of this digest.
Required Associated Types§
Required Methods§
Sourcefn from_bytes(bytes: Self::Bytes) -> Self
fn from_bytes(bytes: Self::Bytes) -> Self
Constructs a new digest from bytes.
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.